mirror of
https://github.com/overte-org/overte.git
synced 2025-07-16 20:37:29 +02:00
do not reset hud from button
This commit is contained in:
parent
6a1dd235c9
commit
7da854d98c
1 changed files with 6 additions and 3 deletions
|
@ -118,10 +118,12 @@ void OverlayConductor::update(float dt) {
|
||||||
bool isDriving = updateAvatarHasDriveInput();
|
bool isDriving = updateAvatarHasDriveInput();
|
||||||
bool drivingChanged = prevDriving != isDriving;
|
bool drivingChanged = prevDriving != isDriving;
|
||||||
bool isAtRest = updateAvatarIsAtRest();
|
bool isAtRest = updateAvatarIsAtRest();
|
||||||
|
bool shouldRecenter = false;
|
||||||
|
|
||||||
if (_flags & SuppressedByDrive) {
|
if (_flags & SuppressedByDrive) {
|
||||||
if (!isDriving) {
|
if (!isDriving) {
|
||||||
_flags &= ~SuppressedByDrive;
|
_flags &= ~SuppressedByDrive;
|
||||||
|
shouldRecenter = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (myAvatar->getClearOverlayWhenMoving() && drivingChanged && isDriving) {
|
if (myAvatar->getClearOverlayWhenMoving() && drivingChanged && isDriving) {
|
||||||
|
@ -132,6 +134,7 @@ void OverlayConductor::update(float dt) {
|
||||||
if (_flags & SuppressedByHead) {
|
if (_flags & SuppressedByHead) {
|
||||||
if (isAtRest) {
|
if (isAtRest) {
|
||||||
_flags &= ~SuppressedByHead;
|
_flags &= ~SuppressedByHead;
|
||||||
|
shouldRecenter = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (_hmdMode && headOutsideOverlay()) {
|
if (_hmdMode && headOutsideOverlay()) {
|
||||||
|
@ -143,8 +146,8 @@ void OverlayConductor::update(float dt) {
|
||||||
bool targetVisible = Menu::getInstance()->isOptionChecked(MenuOption::Overlays) && (0 == (_flags & SuppressMask));
|
bool targetVisible = Menu::getInstance()->isOptionChecked(MenuOption::Overlays) && (0 == (_flags & SuppressMask));
|
||||||
if (targetVisible != currentVisible) {
|
if (targetVisible != currentVisible) {
|
||||||
offscreenUi->setPinned(!targetVisible);
|
offscreenUi->setPinned(!targetVisible);
|
||||||
if (targetVisible && _hmdMode) {
|
}
|
||||||
centerUI();
|
if (shouldRecenter) {
|
||||||
}
|
centerUI();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue