mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-08 16:12:12 +02:00
added button to menu
This commit is contained in:
parent
c0e82d3e05
commit
fc4b4f85f4
4 changed files with 16 additions and 30 deletions
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -63,7 +63,6 @@ if (headset) {
|
|||
alpha: 0.9
|
||||
});*/
|
||||
button = tablet.addButton({
|
||||
color: "#63d0ff",
|
||||
text: "SWITCH"});
|
||||
onHmdChanged(HMD.active);
|
||||
|
||||
|
|
Loading…
Reference in a new issue