mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-30 06:54:15 +02:00
Improve communication with hand controller script
This commit is contained in:
parent
cadd4685ee
commit
a24a0265f9
1 changed files with 10 additions and 2 deletions
|
@ -22,14 +22,19 @@
|
||||||
VR_EDIT_SETTING = "io.highfidelity.isVREditing"; // Note: This constant is duplicated in utils.js.
|
VR_EDIT_SETTING = "io.highfidelity.isVREditing"; // Note: This constant is duplicated in utils.js.
|
||||||
|
|
||||||
|
|
||||||
|
function updateHandControllerGrab() {
|
||||||
|
// Communicate status to handControllerGrab.js.
|
||||||
|
Settings.setValue(VR_EDIT_SETTING, isAppActive);
|
||||||
|
}
|
||||||
|
|
||||||
function onButtonClicked() {
|
function onButtonClicked() {
|
||||||
isAppActive = !isAppActive;
|
isAppActive = !isAppActive;
|
||||||
Settings.setValue(VR_EDIT_SETTING, isAppActive);
|
updateHandControllerGrab();
|
||||||
button.editProperties({ isActive: isAppActive });
|
button.editProperties({ isActive: isAppActive });
|
||||||
}
|
}
|
||||||
|
|
||||||
function setUp() {
|
function setUp() {
|
||||||
Settings.setValue(VR_EDIT_SETTING, isAppActive);
|
updateHandControllerGrab();
|
||||||
|
|
||||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||||
if (!tablet) {
|
if (!tablet) {
|
||||||
|
@ -49,6 +54,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function tearDown() {
|
function tearDown() {
|
||||||
|
isAppActive = false;
|
||||||
|
updateHandControllerGrab();
|
||||||
|
|
||||||
if (!tablet) {
|
if (!tablet) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue