mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
Hide reticle during snapshot
This commit is contained in:
parent
1aca43ea88
commit
a8fd92d2bf
1 changed files with 4 additions and 1 deletions
|
@ -9,7 +9,7 @@
|
|||
//
|
||||
var SNAPSHOT_DELAY = 500; // 500ms
|
||||
var toolBar = Toolbars.getToolbar("com.highfidelity.interface.toolbar.system");
|
||||
var resetOverlays;
|
||||
var resetOverlays, recticleVisible;
|
||||
var button = toolBar.addButton({
|
||||
objectName: "snapshot",
|
||||
imageURL: Script.resolvePath("assets/images/tools/snap.svg"),
|
||||
|
@ -57,6 +57,8 @@ function snapshotShared(success) {
|
|||
function onClicked() {
|
||||
// update button states
|
||||
resetOverlays = Menu.isOptionChecked("Overlays");
|
||||
reticleVisible = Reticle.visible;
|
||||
Reticle.visible = false;
|
||||
Window.snapshotTaken.connect(resetButtons);
|
||||
|
||||
button.writeProperty("buttonState", 0);
|
||||
|
@ -84,6 +86,7 @@ function resetButtons(path, notify) {
|
|||
}
|
||||
// show hud
|
||||
toolBar.writeProperty("visible", true);
|
||||
Reticle.visible = reticleVisible;
|
||||
|
||||
// update button states
|
||||
button.writeProperty("buttonState", 1);
|
||||
|
|
Loading…
Reference in a new issue