mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 04:57:58 +02:00
changing mic bar indicator when muted in PTT
This commit is contained in:
parent
4eefd1389f
commit
80821e8b7e
2 changed files with 32 additions and 36 deletions
|
@ -140,6 +140,29 @@ Rectangle {
|
||||||
checked = Qt.binding(function() { return AudioScriptingInterface.isStereoInput; }); // restore binding
|
checked = Qt.binding(function() { return AudioScriptingInterface.isStereoInput; }); // restore binding
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HifiControlsUit.Switch {
|
||||||
|
id: pttSwitch
|
||||||
|
height: root.switchHeight;
|
||||||
|
switchWidth: root.switchWidth;
|
||||||
|
labelTextOn: qsTr("Push To Talk (T)");
|
||||||
|
backgroundOnColor: "#E3E3E3";
|
||||||
|
checked: (bar.currentIndex === 0) ? AudioScriptingInterface.pushToTalkDesktop : AudioScriptingInterface.pushToTalkHMD;
|
||||||
|
onCheckedChanged: {
|
||||||
|
if (bar.currentIndex === 0) {
|
||||||
|
AudioScriptingInterface.pushToTalkDesktop = checked;
|
||||||
|
} else {
|
||||||
|
AudioScriptingInterface.pushToTalkHMD = checked;
|
||||||
|
}
|
||||||
|
checked = Qt.binding(function() {
|
||||||
|
if (bar.currentIndex === 0) {
|
||||||
|
return AudioScriptingInterface.pushToTalkDesktop;
|
||||||
|
} else {
|
||||||
|
return AudioScriptingInterface.pushToTalkHMD;
|
||||||
|
}
|
||||||
|
}); // restore binding
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
@ -171,53 +194,26 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Separator { id: pttStartSeparator; }
|
|
||||||
Item {
|
Item {
|
||||||
|
anchors.left: parent.left
|
||||||
width: rightMostInputLevelPos;
|
width: rightMostInputLevelPos;
|
||||||
height: pttSwitch.height + pttText.height + 24;
|
height: pttText.height;
|
||||||
HifiControlsUit.Switch {
|
|
||||||
id: pttSwitch
|
|
||||||
x: 2 * margins.paddings;
|
|
||||||
anchors.top: parent.top;
|
|
||||||
height: root.switchHeight;
|
|
||||||
switchWidth: root.switchWidth;
|
|
||||||
labelTextOn: qsTr("Push To Talk (T)");
|
|
||||||
backgroundOnColor: "#E3E3E3";
|
|
||||||
checked: (bar.currentIndex === 0) ? AudioScriptingInterface.pushToTalkDesktop : AudioScriptingInterface.pushToTalkHMD;
|
|
||||||
onCheckedChanged: {
|
|
||||||
if (bar.currentIndex === 0) {
|
|
||||||
AudioScriptingInterface.pushToTalkDesktop = checked;
|
|
||||||
} else {
|
|
||||||
AudioScriptingInterface.pushToTalkHMD = checked;
|
|
||||||
}
|
|
||||||
checked = Qt.binding(function() {
|
|
||||||
if (bar.currentIndex === 0) {
|
|
||||||
return AudioScriptingInterface.pushToTalkDesktop;
|
|
||||||
} else {
|
|
||||||
return AudioScriptingInterface.pushToTalkHMD;
|
|
||||||
}
|
|
||||||
}); // restore binding
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RalewayRegular {
|
RalewayRegular {
|
||||||
id: pttText
|
id: pttText
|
||||||
x: 2 * margins.paddings;
|
x: margins.paddings;
|
||||||
color: hifi.colors.white;
|
color: hifi.colors.white;
|
||||||
anchors.bottom: parent.bottom;
|
|
||||||
width: rightMostInputLevelPos;
|
width: rightMostInputLevelPos;
|
||||||
height: paintedHeight;
|
height: paintedHeight;
|
||||||
wrapMode: Text.WordWrap;
|
wrapMode: Text.WordWrap;
|
||||||
font.italic: true
|
font.italic: true
|
||||||
size: 16;
|
size: 16;
|
||||||
|
|
||||||
text: (bar.currentIndex === 0) ? qsTr("Press and hold the button \"T\" to unmute.") :
|
text: (bar.currentIndex === 0) ? qsTr("Press and hold the button \"T\" to talk.") :
|
||||||
qsTr("Press and hold grip triggers on both of your controllers to unmute.");
|
qsTr("Press and hold grip triggers on both of your controllers to talk.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Separator {
|
Separator { }
|
||||||
id: pttEndSeparator;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
|
@ -159,7 +159,7 @@ Rectangle {
|
||||||
|
|
||||||
color: parent.color;
|
color: parent.color;
|
||||||
|
|
||||||
text: (AudioScriptingInterface.pushToTalk && !AudioScriptingInterface.pushingToTalk) ? "MUTED PTT-(T)" : (AudioScriptingInterface.muted ? "MUTED" : "MUTE");
|
text: (AudioScriptingInterface.pushToTalk && !AudioScriptingInterface.pushingToTalk) ? (HMD.active ? "MUTED PTT" : "MUTED PTT-(T)") : (AudioScriptingInterface.muted ? "MUTED" : "MUTE");
|
||||||
font.pointSize: 12;
|
font.pointSize: 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ Rectangle {
|
||||||
verticalCenter: parent.verticalCenter;
|
verticalCenter: parent.verticalCenter;
|
||||||
}
|
}
|
||||||
|
|
||||||
width: AudioScriptingInterface.pushToTalk && !AudioScriptingInterface.pushingToTalk ? 25 : 50;
|
width: AudioScriptingInterface.pushToTalk && !AudioScriptingInterface.pushingToTalk ? (HMD.active ? 27 : 25) : 50;
|
||||||
height: 4;
|
height: 4;
|
||||||
color: parent.color;
|
color: parent.color;
|
||||||
}
|
}
|
||||||
|
@ -180,7 +180,7 @@ Rectangle {
|
||||||
verticalCenter: parent.verticalCenter;
|
verticalCenter: parent.verticalCenter;
|
||||||
}
|
}
|
||||||
|
|
||||||
width: AudioScriptingInterface.pushToTalk && !AudioScriptingInterface.pushingToTalk ? 25 : 50;
|
width: AudioScriptingInterface.pushToTalk && !AudioScriptingInterface.pushingToTalk ? (HMD.active ? 27 : 25) : 50;
|
||||||
height: 4;
|
height: 4;
|
||||||
color: parent.color;
|
color: parent.color;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue