diff --git a/src/games/cclcc/optionsmenu.cpp b/src/games/cclcc/optionsmenu.cpp index 21b9ba43..6266223b 100644 --- a/src/games/cclcc/optionsmenu.cpp +++ b/src/games/cclcc/optionsmenu.cpp @@ -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); @@ -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() {