mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 14:43:02 +02:00
add a stubbed version of the ignore script
This commit is contained in:
parent
345478eb36
commit
8724f0d0d9
1 changed files with 40 additions and 0 deletions
40
scripts/system/ignore.js
Normal file
40
scripts/system/ignore.js
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
//
|
||||||
|
// ignore.js
|
||||||
|
// scripts/system/
|
||||||
|
//
|
||||||
|
// Created by Stephen Birarda on 07/11/2016
|
||||||
|
// Copyright 2016 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
// grab the toolbar
|
||||||
|
var toolbar = Toolbars.getToolbar("com.highfidelity.interface.toolbar.system");
|
||||||
|
|
||||||
|
// setup the ignore button and add it to the toolbar
|
||||||
|
var button = toolbar.addButton({
|
||||||
|
objectName: 'ignore',
|
||||||
|
imageURL: Script.resolvePath("assets/images/tools/mic.svg"),
|
||||||
|
visible: true,
|
||||||
|
buttonState: 1,
|
||||||
|
alpha: 0.9
|
||||||
|
});
|
||||||
|
|
||||||
|
var isShowingOverlays = false;
|
||||||
|
|
||||||
|
// handle clicks on the toolbar button
|
||||||
|
function buttonClicked(){
|
||||||
|
if (isShowingOverlays) {
|
||||||
|
hideOverlays();
|
||||||
|
} else {
|
||||||
|
showOverlays();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
button.clicked.connect(buttonClicked);
|
||||||
|
|
||||||
|
// remove the toolbar button when script is stopped
|
||||||
|
Script.scriptEnding.connect(function() {
|
||||||
|
toolbar.removeButton('ignore');
|
||||||
|
});
|
Loading…
Reference in a new issue