mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 03:04:40 +02:00
Fix logic for HMD vs Desktop.
This commit is contained in:
parent
ec0cf3ee3a
commit
c1ed01115d
1 changed files with 5 additions and 10 deletions
|
@ -184,18 +184,15 @@ Rectangle {
|
||||||
switchWidth: root.switchWidth;
|
switchWidth: root.switchWidth;
|
||||||
labelTextOn: qsTr("Push To Talk (T)");
|
labelTextOn: qsTr("Push To Talk (T)");
|
||||||
backgroundOnColor: "#E3E3E3";
|
backgroundOnColor: "#E3E3E3";
|
||||||
checked: (bar.currentIndex === 1 && isVR) ||
|
checked: (bar.currentIndex === 0) ? AudioScriptingInterface.pushToTalkDesktop : AudioScriptingInterface.pushToTalkHMD;
|
||||||
(bar.currentIndex === 0 && !isVR) ? AudioScriptingInterface.pushToTalkDesktop : AudioScriptingInterface.pushToTalkHMD;
|
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
if ((bar.currentIndex === 1 && isVR) ||
|
if (bar.currentIndex === 0) {
|
||||||
(bar.currentIndex === 0 && !isVR)) {
|
|
||||||
AudioScriptingInterface.pushToTalkDesktop = checked;
|
AudioScriptingInterface.pushToTalkDesktop = checked;
|
||||||
} else {
|
} else {
|
||||||
AudioScriptingInterface.pushToTalkHMD = checked;
|
AudioScriptingInterface.pushToTalkHMD = checked;
|
||||||
}
|
}
|
||||||
checked = Qt.binding(function() {
|
checked = Qt.binding(function() {
|
||||||
if ((bar.currentIndex === 1 && isVR) ||
|
if (bar.currentIndex === 0) {
|
||||||
(bar.currentIndex === 0 && !isVR)) {
|
|
||||||
return AudioScriptingInterface.pushToTalkDesktop;
|
return AudioScriptingInterface.pushToTalkDesktop;
|
||||||
} else {
|
} else {
|
||||||
return AudioScriptingInterface.pushToTalkHMD;
|
return AudioScriptingInterface.pushToTalkHMD;
|
||||||
|
@ -218,13 +215,11 @@ Rectangle {
|
||||||
id: pttText
|
id: pttText
|
||||||
color: hifi.colors.white;
|
color: hifi.colors.white;
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
wrapMode: (bar.currentIndex === 1 && isVR) ||
|
wrapMode: (bar.currentIndex === 0) ? Text.NoWrap : Text.WordWrap;
|
||||||
(bar.currentIndex === 0 && !isVR) ? Text.NoWrap : Text.WordWrap;
|
|
||||||
font.italic: true
|
font.italic: true
|
||||||
size: 16;
|
size: 16;
|
||||||
|
|
||||||
text: (bar.currentIndex === 1 && isVR) ||
|
text: (bar.currentIndex === 0) ? qsTr("Press and hold the button \"T\" to unmute.") :
|
||||||
(bar.currentIndex === 0 && !isVR) ? qsTr("Press and hold the button \"T\" to unmute.") :
|
|
||||||
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 unmute.");
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
if (pttTextMetrics.width > pttTextContainer.width) {
|
if (pttTextMetrics.width > pttTextContainer.width) {
|
||||||
|
|
Loading…
Reference in a new issue