Skip to content

Commit

Permalink
Fix missing loading circle?
Browse files Browse the repository at this point in the history
  • Loading branch information
Alphalaneous committed Oct 16, 2024
1 parent 897e663 commit 684b95a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"android": "2.206",
"mac": "2.206"
},
"version": "v1.5.1",
"version": "v1.5.2",
"id": "alphalaneous.happy_textures",
"name": "Happy Textures :3",
"developer": "Alphalaneous",
Expand Down
9 changes: 5 additions & 4 deletions src/nodes/LevelInfoLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ class $modify(MyLevelInfoLayer, LevelInfoLayer) {
LevelInfoLayer::onPlay(sender);

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

if (!m_playSprite) return;

CCSprite* spriteOuter = getChildOfType<CCSprite>(m_playSprite, 0);
CCSprite* spriteInner = getChildOfType<CCSprite>(m_playSprite, 1);
CCSprite* spriteCenter = getChildOfType<CCSprite>(m_playSprite, 2);

if (!spriteOuter || !spriteInner || !spriteCenter || !m_progressTimer || !m_progressTimer->getSprite()) return;

if (CCSprite* spr = Utils::getValidSprite("play_loading_outer.png")) {
spriteOuter->setTexture(spr->getTexture());
spriteOuter->setTextureRect(spr->getTextureRect());
Expand All @@ -30,15 +35,11 @@ class $modify(MyLevelInfoLayer, LevelInfoLayer) {
spriteInner->setTextureRect(spr->getTextureRect());
}

#ifndef GEODE_IS_MACOS

if (CCSprite* spr = Utils::getValidSprite("play_loading_progress.png")) {
spr->setColor(m_progressTimer->getSprite()->getColor());
m_progressTimer->setSprite(spr);
}

#endif

Utils::setColorIfExists(spriteOuter, "play-loading-outer");
Utils::setColorIfExists(spriteCenter, "play-loading-center");
Utils::setColorIfExists(spriteInner, "play-loading-inner");
Expand Down

0 comments on commit 684b95a

Please sign in to comment.