mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-29 12:19:54 +02:00
6677: Change "Desktop" App to Say "Exit VR"
This commit is contained in:
parent
f3a9481123
commit
d05e1677c3
1 changed files with 6 additions and 3 deletions
|
@ -43,17 +43,20 @@ var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||||
// Independent and Entity mode make people sick; disable them in hmd.
|
// Independent and Entity mode make people sick; disable them in hmd.
|
||||||
var desktopOnlyViews = ['Independent Mode', 'Entity Mode'];
|
var desktopOnlyViews = ['Independent Mode', 'Entity Mode'];
|
||||||
|
|
||||||
|
var switchToVR = "Enter VR";
|
||||||
|
var switchToDesktop = "Exit VR";
|
||||||
|
|
||||||
function onHmdChanged(isHmd) {
|
function onHmdChanged(isHmd) {
|
||||||
HMD.closeTablet();
|
HMD.closeTablet();
|
||||||
if (isHmd) {
|
if (isHmd) {
|
||||||
button.editProperties({
|
button.editProperties({
|
||||||
icon: "icons/tablet-icons/switch-desk-i.svg",
|
icon: "icons/tablet-icons/switch-desk-i.svg",
|
||||||
text: "DESKTOP"
|
text: switchToDesktop
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
button.editProperties({
|
button.editProperties({
|
||||||
icon: "icons/tablet-icons/switch-vr-i.svg",
|
icon: "icons/tablet-icons/switch-vr-i.svg",
|
||||||
text: "VR"
|
text: switchToVR
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
desktopOnlyViews.forEach(function (view) {
|
desktopOnlyViews.forEach(function (view) {
|
||||||
|
@ -70,7 +73,7 @@ function onClicked() {
|
||||||
if (headset) {
|
if (headset) {
|
||||||
button = tablet.addButton({
|
button = tablet.addButton({
|
||||||
icon: HMD.active ? "icons/tablet-icons/switch-desk-i.svg" : "icons/tablet-icons/switch-vr-i.svg",
|
icon: HMD.active ? "icons/tablet-icons/switch-desk-i.svg" : "icons/tablet-icons/switch-vr-i.svg",
|
||||||
text: HMD.active ? "DESKTOP" : "VR",
|
text: HMD.active ? switchToDesktop : switchToVR,
|
||||||
sortOrder: 2
|
sortOrder: 2
|
||||||
});
|
});
|
||||||
onHmdChanged(HMD.active);
|
onHmdChanged(HMD.active);
|
||||||
|
|
Loading…
Reference in a new issue