diff --git a/scripts/system/bubble.js b/scripts/system/bubble.js index 7b02ab7141..74f6588366 100644 --- a/scripts/system/bubble.js +++ b/scripts/system/bubble.js @@ -91,9 +91,9 @@ // Used to set the state of the bubble HUD button function writeButtonProperties(parameter) { - //button.writeProperty('buttonState', parameter ? 0 : 1); - //button.writeProperty('defaultState', parameter ? 0 : 1); - //button.writeProperty('hoverState', parameter ? 2 : 3); + var buttonProperties = button.getProperties(); + buttonProperties.isActive = parameter; + button.editProperties(buttonProperties); } // The bubble script's update function @@ -168,14 +168,7 @@ // Setup the bubble button and add it to the toolbar var button = tablet.addButton({ - color: "#63b0ff", text: "BUBBLE"}); - /*var button = toolbar.addButton({ - objectName: 'bubble', - imageURL: buttonImageURL(), - visible: true, - alpha: 0.9 - });*/ onBubbleToggled(); button.clicked.connect(Users.toggleIgnoreRadius); diff --git a/scripts/system/edit.js b/scripts/system/edit.js index dd9a240e35..04f618b627 100644 --- a/scripts/system/edit.js +++ b/scripts/system/edit.js @@ -165,7 +165,6 @@ function toggleMarketplace() { } var TOOLS_PATH = Script.resolvePath("assets/images/tools/"); - var toolBar = (function () { var EDIT_SETTING = "io.highfidelity.isEditting"; // for communication with other scripts var that = {}, @@ -234,7 +233,6 @@ var toolBar = (function () { systemToolbar = Toolbars.getToolbar(SYSTEM_TOOLBAR); tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); activeButton = tablet.addButton({ - color: "#63d0ff", text: "EDIT" }); /*activeButton = systemToolbar.addButton({ @@ -446,9 +444,9 @@ var toolBar = (function () { that.toggle = function () { that.setActive(!isActive); - activeButton.writeProperty("buttonState", isActive ? 0 : 1); - activeButton.writeProperty("defaultState", isActive ? 0 : 1); - activeButton.writeProperty("hoverState", isActive ? 2 : 3); + var buttonProperties = activeButton.getProperties(); + buttonProperties.isActive = isActive; + activeButton.editProperties(buttonProperties); }; that.setActive = function (active) { diff --git a/scripts/system/goto.js b/scripts/system/goto.js index 5e9e7c20e7..db027dcb48 100644 --- a/scripts/system/goto.js +++ b/scripts/system/goto.js @@ -14,26 +14,22 @@ (function() { // BEGIN LOCAL_SCOPE var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); - +var isActive = false var button = tablet.addButton({ - color: "63d0ff", text:"GOTO"}) -/*var button = toolBar.addButton({ - objectName: "goto", - imageURL: Script.resolvePath("assets/images/tools/directory.svg"), - visible: true, - buttonState: 1, - defaultState: 1, - hoverState: 3, - alpha: 0.9, -});*/ + function onAddressBarShown(visible) { - //button.writeProperty('buttonState', visible ? 0 : 1); - //button.writeProperty('defaultState', visible ? 0 : 1); - //button.writeProperty('hoverState', visible ? 2 : 3); +} + +function setActive(active) { + isActive = active; } function onClicked(){ + setActive(!isActive); + var buttonProperties = button.getProperties(); + buttonProperties.isActive = isActive; + button.editProperties(buttonProperties); DialogsManager.toggleAddressBar(); } button.clicked.connect(onClicked); diff --git a/scripts/system/hmd.js b/scripts/system/hmd.js index 01fb882040..a95443488e 100644 --- a/scripts/system/hmd.js +++ b/scripts/system/hmd.js @@ -63,7 +63,6 @@ if (headset) { alpha: 0.9 });*/ button = tablet.addButton({ - color: "#63d0ff", text: "SWITCH"}); onHmdChanged(HMD.active);