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 fad75f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/games/cclcc/savemenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "../../data/savesystem.h"
#include "../../vm/vm.h"

#include "../../profile/games/cclcc/titlemenu.h"
#include "titlemenu.h"

namespace Impacto {
namespace UI {
Expand Down 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)->DrawMainMenuBackGraphics(false);
} 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 fad75f3

Please sign in to comment.