Skip to content

Commit

Permalink
Maybe better fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
Alphalaneous committed Oct 16, 2024
1 parent 684b95a commit 0fc0471
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/nodes/LevelInfoLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@ using namespace geode::prelude;

class $modify(MyLevelInfoLayer, LevelInfoLayer) {

void onPlay(cocos2d::CCObject* sender) {
LevelInfoLayer::onPlay(sender);
struct Fields {
bool m_didLoad;
};

void loadLevelStep() {
LevelInfoLayer::loadLevelStep();

if (UIModding::get()->doModify) {

if (!m_playSprite) return;

if (m_fields->m_didLoad) return;
m_fields->m_didLoad = true;

CCSprite* spriteOuter = getChildOfType<CCSprite>(m_playSprite, 0);
CCSprite* spriteInner = getChildOfType<CCSprite>(m_playSprite, 1);
Expand Down

0 comments on commit 0fc0471

Please sign in to comment.