mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 18:47:28 +02:00
make away show overlays if they are hidden when you enter away
This commit is contained in:
parent
18f5b14e7a
commit
d32611a7f9
1 changed files with 11 additions and 0 deletions
|
@ -152,6 +152,7 @@ function maybeMoveOverlay() {
|
|||
|
||||
// MAIN CONTROL
|
||||
var wasMuted, isAway;
|
||||
var wasOverlaysVisible = Menu.isOptionChecked("Overlays");
|
||||
var eventMappingName = "io.highfidelity.away"; // goActive on hand controller button events, too.
|
||||
var eventMapping = Controller.newMapping(eventMappingName);
|
||||
|
||||
|
@ -169,6 +170,13 @@ function goAway() {
|
|||
playAwayAnimation(); // animation is still seen by others
|
||||
showOverlay();
|
||||
|
||||
// remember the View > Overlays state...
|
||||
wasOverlaysVisible = Menu.isOptionChecked("Overlays");
|
||||
print("wasOverlaysVisible:" + wasOverlaysVisible);
|
||||
|
||||
// show overlays so that people can see the "Away" message
|
||||
Menu.setIsOptionChecked("Overlays", true);
|
||||
|
||||
// tell the Reticle, we want to stop capturing the mouse until we come back
|
||||
Reticle.allowMouseCapture = false;
|
||||
if (HMD.active) {
|
||||
|
@ -188,6 +196,9 @@ function goActive() {
|
|||
stopAwayAnimation();
|
||||
hideOverlay();
|
||||
|
||||
// restore overlays state to what it was when we went "away"
|
||||
Menu.setIsOptionChecked("Overlays", wasOverlaysVisible);
|
||||
|
||||
// tell the Reticle, we are ready to capture the mouse again and it should be visible
|
||||
Reticle.allowMouseCapture = true;
|
||||
Reticle.visible = true;
|
||||
|
|
Loading…
Reference in a new issue