mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 22:54:13 +02:00
added tablet button
This commit is contained in:
parent
e0779db1ab
commit
95a92fc5eb
1 changed files with 19 additions and 0 deletions
|
@ -13,6 +13,18 @@
|
||||||
|
|
||||||
(function() { // BEGIN LOCAL_SCOPE
|
(function() { // BEGIN LOCAL_SCOPE
|
||||||
|
|
||||||
|
// create tablet button
|
||||||
|
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||||
|
var button = tablet.addButton({
|
||||||
|
icon: "icons/tablet-icons/people-i.svg",
|
||||||
|
text: "Users"
|
||||||
|
});
|
||||||
|
function onClicked() {
|
||||||
|
// hide/show users overlays
|
||||||
|
|
||||||
|
}
|
||||||
|
button.clicked.connect(onClicked);
|
||||||
|
|
||||||
// resolve these paths immediately
|
// resolve these paths immediately
|
||||||
var MIN_MAX_BUTTON_SVG = Script.resolvePath("assets/images/tools/min-max-toggle.svg");
|
var MIN_MAX_BUTTON_SVG = Script.resolvePath("assets/images/tools/min-max-toggle.svg");
|
||||||
var BASE_URL = Script.resolvePath("assets/images/tools/");
|
var BASE_URL = Script.resolvePath("assets/images/tools/");
|
||||||
|
@ -1234,4 +1246,11 @@ var usersWindow = (function () {
|
||||||
Script.scriptEnding.connect(tearDown);
|
Script.scriptEnding.connect(tearDown);
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
function cleanup () {
|
||||||
|
//remove tablet button
|
||||||
|
button.clicked.disconnect(onClicked);
|
||||||
|
tablet.removeButton(button);
|
||||||
|
}
|
||||||
|
Script.scriptEnding.connect(cleanup);
|
||||||
|
|
||||||
}()); // END LOCAL_SCOPE
|
}()); // END LOCAL_SCOPE
|
||||||
|
|
Loading…
Reference in a new issue