mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-10 17:22:58 +02:00
made requested changes
This commit is contained in:
parent
fe4fa351d1
commit
bee6e230ae
4 changed files with 13 additions and 16 deletions
|
@ -91,9 +91,7 @@
|
|||
|
||||
// Used to set the state of the bubble HUD button
|
||||
function writeButtonProperties(parameter) {
|
||||
var buttonProperties = button.getProperties();
|
||||
buttonProperties.isActive = parameter;
|
||||
button.editProperties(buttonProperties);
|
||||
button.editProperties({isActive: parameter});
|
||||
}
|
||||
|
||||
// The bubble script's update function
|
||||
|
@ -168,7 +166,8 @@
|
|||
|
||||
// Setup the bubble button and add it to the toolbar
|
||||
var button = tablet.addButton({
|
||||
text: "BUBBLE"});
|
||||
text: "BUBBLE"
|
||||
});
|
||||
onBubbleToggled();
|
||||
|
||||
button.clicked.connect(Users.toggleIgnoreRadius);
|
||||
|
|
|
@ -170,7 +170,6 @@ var toolBar = (function () {
|
|||
var EDIT_SETTING = "io.highfidelity.isEditting"; // for communication with other scripts
|
||||
var that = {},
|
||||
toolBar,
|
||||
systemToolbar,
|
||||
activeButton,
|
||||
tablet;
|
||||
|
||||
|
@ -231,11 +230,11 @@ var toolBar = (function () {
|
|||
}
|
||||
});
|
||||
|
||||
systemToolbar = Toolbars.getToolbar(SYSTEM_TOOLBAR);
|
||||
|
||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
activeButton = tablet.addButton({
|
||||
text: "EDIT"
|
||||
});
|
||||
});
|
||||
|
||||
activeButton.clicked.connect(function() {
|
||||
that.toggle();
|
||||
|
@ -437,9 +436,7 @@ var toolBar = (function () {
|
|||
|
||||
that.toggle = function () {
|
||||
that.setActive(!isActive);
|
||||
var buttonProperties = activeButton.getProperties();
|
||||
buttonProperties.isActive = isActive;
|
||||
activeButton.editProperties(buttonProperties);
|
||||
activeButton.editProperties({isActive: isActive});
|
||||
};
|
||||
|
||||
that.setActive = function (active) {
|
||||
|
|
|
@ -16,20 +16,19 @@
|
|||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var isActive = false
|
||||
var button = tablet.addButton({
|
||||
text:"GOTO"})
|
||||
text:"GOTO"
|
||||
});
|
||||
|
||||
|
||||
function onAddressBarShown(visible) {
|
||||
}
|
||||
|
||||
function setActive(active) {
|
||||
isActive = active;
|
||||
isActive = active;
|
||||
}
|
||||
function onClicked(){
|
||||
setActive(!isActive);
|
||||
var buttonProperties = button.getProperties();
|
||||
buttonProperties.isActive = isActive;
|
||||
button.editProperties(buttonProperties);
|
||||
button.editProperties({isActive: isActive});
|
||||
DialogsManager.toggleAddressBar();
|
||||
}
|
||||
button.clicked.connect(onClicked);
|
||||
|
|
|
@ -41,6 +41,7 @@ var button;
|
|||
// Disable them in hmd.
|
||||
var desktopOnlyViews = ['Mirror', 'Independent Mode', 'Entity Mode'];
|
||||
function onHmdChanged(isHmd) {
|
||||
//TODO change button icon when the hmd changes
|
||||
desktopOnlyViews.forEach(function (view) {
|
||||
Menu.setMenuEnabled("View>" + view, !isHmd);
|
||||
});
|
||||
|
@ -52,7 +53,8 @@ function onClicked(){
|
|||
}
|
||||
if (headset) {
|
||||
button = tablet.addButton({
|
||||
text: "SWITCH"});
|
||||
text: "SWITCH"
|
||||
});
|
||||
onHmdChanged(HMD.active);
|
||||
|
||||
button.clicked.connect(onClicked);
|
||||
|
|
Loading…
Reference in a new issue