Skip to content

Commit

Permalink
Lazy display title menu bg on save menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Dextinfire committed Sep 14, 2024
1 parent 96c26f8 commit 7f418b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/games/cclcc/savemenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<CCLCC::TitleMenu*>(TitleMenuPtr)->DrawMainBackground(col[3]);
} else {
Renderer->DrawSprite(SaveMenuBackgroundSprite, glm::vec2(0.0f), col);
}
Expand Down
7 changes: 4 additions & 3 deletions src/games/cclcc/titlemenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit 7f418b7

Please sign in to comment.