Some minor tweaks

This commit is contained in:
Menithal 2017-09-12 22:12:30 +03:00
parent 79603765c4
commit 40beb4bca8
3 changed files with 7 additions and 18 deletions

View file

@ -21,7 +21,11 @@ var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
// Define Menu
var blackIcon = Script.resolvePath("icons/tablet-icons/clap-a.svg?foxv2");
var whiteIcon = Script.resolvePath("icons/tablet-icons/clap-i.svg?foxv2");
var isActive = true;
if ( Settings.getValue("clapAppEnabled") === undefined){
Settings.setValue("clapAppEnabled", true);
}
var isActive = Settings.getValue("clapAppEnabled");
var activeButton = tablet.addButton({
icon: whiteIcon,
@ -38,6 +42,7 @@ if (isActive) {
function onClick(enabled) {
isActive = !isActive;
Settings.setValue("clapAppEnabled", isActive);
activeButton.editProperties({
isActive: isActive
});

View file

@ -78,17 +78,6 @@ module.exports = {
});
},
clapSphere: function (pos, vol) {
Overlays.editOverlay(DEBUG_CLAP, {
position: pos,
scale: {
x: vol,
y: vol,
z: vol
}
});
},
enableDebug: function () {
DEBUG_RIGHT_HAND = Overlays.addOverlay("line3d", {
color: DEBUG_WRONG,

View file

@ -80,10 +80,6 @@ function clap(volume, position, rotation) {
}
if (settingDebug) {
ClapDebugger.clapSphere(position, volume);
}
}
// Helper Functions
function getHandFingerAnim(side) {
@ -282,12 +278,10 @@ module.exports = {
});
Controller.enableMapping(CONTROL_MAP_PACKAGE);
// settingDebug STUFF
if (settingDebug) {
ClapDebugger.enableDebug();
}
Script.update.connect(update);
Script.scriptEnding.connect(this.disconnectEngine);
@ -308,6 +302,7 @@ module.exports = {
}
restoreFingerRoleAnimation('left');
restoreFingerRoleAnimation('right');
Controller.disableMapping(CONTROL_MAP_PACKAGE);
try {
Script.update.disconnect(update);