Pause button stays down while waiting for GameAction (#21816)

This commit is contained in:
mrmbernardi 2024-04-15 14:26:44 +02:00 committed by GitHub
parent a6e1124175
commit b21f0504cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 1 deletions

View File

@ -289,6 +289,7 @@ static Widget _topToolbarWidgets[] = {
{
private:
bool _landToolBlocked{ false };
bool _waitingForPause{ false };
uint8_t _unkF64F0E{ 0 };
int16_t _unkF64F0A{ 0 };
@ -2487,6 +2488,7 @@ static Widget _topToolbarWidgets[] = {
{
auto pauseToggleAction = PauseToggleAction();
GameActions::Execute(&pauseToggleAction);
_waitingForPause = true;
}
break;
case WIDX_ZOOM_OUT:
@ -3141,8 +3143,13 @@ static Widget _topToolbarWidgets[] = {
else
pressed_widgets |= (1uLL << WIDX_PATH);
if (gGamePaused & GAME_PAUSED_NORMAL)
bool paused = (gGamePaused & GAME_PAUSED_NORMAL);
if (paused || _waitingForPause)
{
pressed_widgets |= (1uLL << WIDX_PAUSE);
if (paused)
_waitingForPause = false;
}
else
pressed_widgets &= ~(1uLL << WIDX_PAUSE);