mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +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 drivingChanged = prevDriving != isDriving;
|
||||
bool isAtRest = updateAvatarIsAtRest();
|
||||
bool shouldRecenter = false;
|
||||
|
||||
if (_flags & SuppressedByDrive) {
|
||||
if (!isDriving) {
|
||||
_flags &= ~SuppressedByDrive;
|
||||
shouldRecenter = true;
|
||||
}
|
||||
} else {
|
||||
if (myAvatar->getClearOverlayWhenMoving() && drivingChanged && isDriving) {
|
||||
|
@ -132,6 +134,7 @@ void OverlayConductor::update(float dt) {
|
|||
if (_flags & SuppressedByHead) {
|
||||
if (isAtRest) {
|
||||
_flags &= ~SuppressedByHead;
|
||||
shouldRecenter = true;
|
||||
}
|
||||
} else {
|
||||
if (_hmdMode && headOutsideOverlay()) {
|
||||
|
@ -143,8 +146,8 @@ void OverlayConductor::update(float dt) {
|
|||
bool targetVisible = Menu::getInstance()->isOptionChecked(MenuOption::Overlays) && (0 == (_flags & SuppressMask));
|
||||
if (targetVisible != currentVisible) {
|
||||
offscreenUi->setPinned(!targetVisible);
|
||||
if (targetVisible && _hmdMode) {
|
||||
centerUI();
|
||||
}
|
||||
}
|
||||
if (shouldRecenter) {
|
||||
centerUI();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue