Skip to content

Commit

Permalink
Fixed options menu exiting
Browse files Browse the repository at this point in the history
  • Loading branch information
PringlesGang committed Dec 27, 2024
1 parent fc8a5f8 commit 9385e16
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/games/cclcc/optionsmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ void OptionsMenu::Hide() {
}

void OptionsMenu::Update(float dt) {
UpdateInput();
Pages.at(CurrentPage)->Update(dt);
const bool wasOut = FadeAnimation.IsOut();

FadeAnimation.Update(dt);
PoleAnimation.Update(dt);
Expand All @@ -176,6 +175,21 @@ void OptionsMenu::Update(float dt) {
ScrWork[SW_SYSSUBMENUNO] == 5) {
Show();
}

if (State != Hidden) {
UpdateInput();
Pages.at(CurrentPage)->Update(dt);
}

if (FadeAnimation.IsIn())
State = Shown;
else if (!wasOut && FadeAnimation.IsOut()) {
State = Hidden;

Pages.at(CurrentPage)->Hide();
CurrentPage = 0;
CurrentlyFocusedElement = nullptr;
}
}

void OptionsMenu::UpdateInput() {
Expand Down

0 comments on commit 9385e16

Please sign in to comment.