mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +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 SNAPSHOT_DELAY = 500; // 500ms
|
||||||
var toolBar = Toolbars.getToolbar("com.highfidelity.interface.toolbar.system");
|
var toolBar = Toolbars.getToolbar("com.highfidelity.interface.toolbar.system");
|
||||||
var resetOverlays;
|
var resetOverlays, recticleVisible;
|
||||||
var button = toolBar.addButton({
|
var button = toolBar.addButton({
|
||||||
objectName: "snapshot",
|
objectName: "snapshot",
|
||||||
imageURL: Script.resolvePath("assets/images/tools/snap.svg"),
|
imageURL: Script.resolvePath("assets/images/tools/snap.svg"),
|
||||||
|
@ -57,6 +57,8 @@ function snapshotShared(success) {
|
||||||
function onClicked() {
|
function onClicked() {
|
||||||
// update button states
|
// update button states
|
||||||
resetOverlays = Menu.isOptionChecked("Overlays");
|
resetOverlays = Menu.isOptionChecked("Overlays");
|
||||||
|
reticleVisible = Reticle.visible;
|
||||||
|
Reticle.visible = false;
|
||||||
Window.snapshotTaken.connect(resetButtons);
|
Window.snapshotTaken.connect(resetButtons);
|
||||||
|
|
||||||
button.writeProperty("buttonState", 0);
|
button.writeProperty("buttonState", 0);
|
||||||
|
@ -84,6 +86,7 @@ function resetButtons(path, notify) {
|
||||||
}
|
}
|
||||||
// show hud
|
// show hud
|
||||||
toolBar.writeProperty("visible", true);
|
toolBar.writeProperty("visible", true);
|
||||||
|
Reticle.visible = reticleVisible;
|
||||||
|
|
||||||
// update button states
|
// update button states
|
||||||
button.writeProperty("buttonState", 1);
|
button.writeProperty("buttonState", 1);
|
||||||
|
|
Loading…
Reference in a new issue