From 684b95a536470bdd48bc0945a54c73745a8178ae Mon Sep 17 00:00:00 2001 From: Alphalaneous <38200084+Alphalaneous@users.noreply.github.com> Date: Wed, 16 Oct 2024 17:41:51 -0400 Subject: [PATCH] Fix missing loading circle? --- mod.json | 2 +- src/nodes/LevelInfoLayer.h | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/mod.json b/mod.json index febb25f..413b33a 100644 --- a/mod.json +++ b/mod.json @@ -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", diff --git a/src/nodes/LevelInfoLayer.h b/src/nodes/LevelInfoLayer.h index 2f1a655..10294fd 100644 --- a/src/nodes/LevelInfoLayer.h +++ b/src/nodes/LevelInfoLayer.h @@ -11,10 +11,15 @@ class $modify(MyLevelInfoLayer, LevelInfoLayer) { LevelInfoLayer::onPlay(sender); if (UIModding::get()->doModify) { + + if (!m_playSprite) return; + CCSprite* spriteOuter = getChildOfType(m_playSprite, 0); CCSprite* spriteInner = getChildOfType(m_playSprite, 1); CCSprite* spriteCenter = getChildOfType(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()); @@ -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");