From 7f418b71232ea6ba87aa2c2c1025a6196713ee1c Mon Sep 17 00:00:00 2001 From: Dextinfire <> Date: Sat, 14 Sep 2024 06:20:03 -0700 Subject: [PATCH] Lazy display title menu bg on save menu --- src/games/cclcc/savemenu.cpp | 2 +- src/games/cclcc/titlemenu.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/games/cclcc/savemenu.cpp b/src/games/cclcc/savemenu.cpp index 65372047..be96ef6e 100644 --- a/src/games/cclcc/savemenu.cpp +++ b/src/games/cclcc/savemenu.cpp @@ -229,7 +229,7 @@ void SaveMenu::Render() { if (State != Hidden) { glm::vec4 col(1.0f, 1.0f, 1.0f, FadeAnimation.Progress); if(LastFocusedMenu == TitleMenuPtr) { - Renderer->DrawSprite(Profile::CCLCC::TitleMenu::BackgroundSprite, glm::vec2(0.0f), col); + static_cast(TitleMenuPtr)->DrawMainBackground(col[3]); } else { Renderer->DrawSprite(SaveMenuBackgroundSprite, glm::vec2(0.0f), col); } diff --git a/src/games/cclcc/titlemenu.h b/src/games/cclcc/titlemenu.h index 8713aba0..73ba6ebd 100644 --- a/src/games/cclcc/titlemenu.h +++ b/src/games/cclcc/titlemenu.h @@ -33,6 +33,10 @@ class TitleMenu : public Menu { void MenuButtonOnClick(Widgets::Button* target); void ContinueButtonOnClick(Widgets::Button* target); void ExtraButtonOnClick(Widgets::Button* target); + + void DrawMainBackground(float opacity = 1.0f); + void DrawMainMenuBackGraphics(bool isTransition); + void DrawSmoke(float opacity); private: Widgets::Group* CurrentSubMenu = 0; @@ -57,10 +61,7 @@ class TitleMenu : public Menu { void ShowExtraItems(); void HideExtraItems(); - void DrawMainBackground(float opacity = 1.0f); void DrawStartButton(); - void DrawMainMenuBackGraphics(bool isTransition); - void DrawSmoke(float opacity); }; } // namespace CCLCC