added tablet button

This commit is contained in:
Faye Li 2017-01-24 14:42:28 -08:00
parent e0779db1ab
commit 95a92fc5eb

View file

@ -13,6 +13,18 @@
(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
var MIN_MAX_BUTTON_SVG = Script.resolvePath("assets/images/tools/min-max-toggle.svg");
var BASE_URL = Script.resolvePath("assets/images/tools/");
@ -1234,4 +1246,11 @@ var usersWindow = (function () {
Script.scriptEnding.connect(tearDown);
}());
function cleanup () {
//remove tablet button
button.clicked.disconnect(onClicked);
tablet.removeButton(button);
}
Script.scriptEnding.connect(cleanup);
}()); // END LOCAL_SCOPE