From 5f7a0ea8fc0857723cc7f579eb54e49d06e355f7 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 9 Mar 2017 00:05:26 +0000 Subject: [PATCH 1/5] Close tablet when switching form HMD to desktop and vice versa --- scripts/system/hmd.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/system/hmd.js b/scripts/system/hmd.js index c206a76e3f..8174cd960c 100644 --- a/scripts/system/hmd.js +++ b/scripts/system/hmd.js @@ -21,10 +21,12 @@ var desktopMenuItemName = "Desktop"; ['OpenVR (Vive)', 'Oculus Rift'].forEach(function (name) { if (!headset && Menu.menuItemExists(displayMenuName, name)) { headset = name; + } }); -var controllerDisplay = false; + + var controllerDisplay = false; function updateControllerDisplay() { if (HMD.active && Menu.isOptionChecked("Third Person")) { if (!controllerDisplay) { @@ -37,7 +39,9 @@ function updateControllerDisplay() { } } -var button; + + var button; + var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); // Independent and Entity mode make people sick. Third Person and Mirror have traps that we need to work through. @@ -45,6 +49,7 @@ var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); var desktopOnlyViews = ['Mirror', 'Independent Mode', 'Entity Mode']; function onHmdChanged(isHmd) { + HMD.closeTablet(); if (isHmd) { button.editProperties({ icon: "icons/tablet-icons/switch-desk-i.svg", From 561bd27c38e4997e4deba36fd1dd483120c36894 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 9 Mar 2017 00:08:50 +0000 Subject: [PATCH 2/5] minimize diff --- scripts/system/hmd.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/system/hmd.js b/scripts/system/hmd.js index 8174cd960c..452801c786 100644 --- a/scripts/system/hmd.js +++ b/scripts/system/hmd.js @@ -21,7 +21,6 @@ var desktopMenuItemName = "Desktop"; ['OpenVR (Vive)', 'Oculus Rift'].forEach(function (name) { if (!headset && Menu.menuItemExists(displayMenuName, name)) { headset = name; - } }); @@ -40,7 +39,7 @@ function updateControllerDisplay() { } - var button; +var button; var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); From f6d799c048818e4bd7d043c6154a0ae96c370b51 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 9 Mar 2017 00:09:32 +0000 Subject: [PATCH 3/5] minimize diff --- scripts/system/hmd.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/system/hmd.js b/scripts/system/hmd.js index 452801c786..af4abf0788 100644 --- a/scripts/system/hmd.js +++ b/scripts/system/hmd.js @@ -25,7 +25,7 @@ var desktopMenuItemName = "Desktop"; }); - var controllerDisplay = false; +var controllerDisplay = false; function updateControllerDisplay() { if (HMD.active && Menu.isOptionChecked("Third Person")) { if (!controllerDisplay) { From b878f164fbf0a18191bb73a56d4e523141d2f2a0 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 9 Mar 2017 00:10:38 +0000 Subject: [PATCH 4/5] minimize diff again --- scripts/system/hmd.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/system/hmd.js b/scripts/system/hmd.js index af4abf0788..39f8338d72 100644 --- a/scripts/system/hmd.js +++ b/scripts/system/hmd.js @@ -24,7 +24,6 @@ var desktopMenuItemName = "Desktop"; } }); - var controllerDisplay = false; function updateControllerDisplay() { if (HMD.active && Menu.isOptionChecked("Third Person")) { @@ -38,9 +37,7 @@ function updateControllerDisplay() { } } - -var button; - +var button; var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); // Independent and Entity mode make people sick. Third Person and Mirror have traps that we need to work through. From 2a275a4f4b7dbb448a3b23a16f7cd3f30a12e7e0 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 9 Mar 2017 00:15:02 +0000 Subject: [PATCH 5/5] removed tab at the end of word --- scripts/system/hmd.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/system/hmd.js b/scripts/system/hmd.js index 39f8338d72..c545e6bcee 100644 --- a/scripts/system/hmd.js +++ b/scripts/system/hmd.js @@ -37,7 +37,7 @@ function updateControllerDisplay() { } } -var button; +var button; var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); // Independent and Entity mode make people sick. Third Person and Mirror have traps that we need to work through.