mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 20:22:27 +02:00
Merge pull request #8030 from howard-stearns/fix-paused-interactions-with-mouse
fix paused interactions with mouse
This commit is contained in:
commit
357ccc17aa
2 changed files with 7 additions and 5 deletions
|
@ -176,9 +176,11 @@ function goAway() {
|
|||
|
||||
// tell the Reticle, we want to stop capturing the mouse until we come back
|
||||
Reticle.allowMouseCapture = false;
|
||||
if (HMD.active) {
|
||||
Reticle.visible = false;
|
||||
}
|
||||
// Allow users to find their way to other applications, our menus, etc.
|
||||
// For desktop, that means we want the reticle visible.
|
||||
// For HMD, the hmd preview will show the system mouse because of allowMouseCapture,
|
||||
// but we want to turn off our Reticle so that we don't get two in preview and a stuck one in headset.
|
||||
Reticle.visible = !HMD.active;
|
||||
wasHmdMounted = safeGetHMDMounted(); // always remember the correct state
|
||||
|
||||
avatarPosition = MyAvatar.position;
|
||||
|
|
|
@ -410,8 +410,8 @@ function update() {
|
|||
if (!Menu.isOptionChecked("First Person")) {
|
||||
return turnOffVisualization(); // What to do? menus can be behind hand!
|
||||
}
|
||||
if (!Window.hasFocus()) {
|
||||
return turnOffVisualization(); // Don't mess with other apps
|
||||
if (!Window.hasFocus() || !Reticle.allowMouseCapture) {
|
||||
return turnOffVisualization(); // Don't mess with other apps or paused mouse activity
|
||||
}
|
||||
leftTrigger.update();
|
||||
rightTrigger.update();
|
||||
|
|
Loading…
Reference in a new issue