From 2f60f5cb3d9030119cbbeb328202c042580b47d2 Mon Sep 17 00:00:00 2001 From: FireMario211 <17692105+FireMario211@users.noreply.github.com> Date: Tue, 12 Mar 2024 14:15:45 -0400 Subject: [PATCH] another one to check off the list --- changelog.md | 1 + src/hacks.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 79aae30..b1b6fb1 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,7 @@ - Made the Prism Button hidden if you are in the Editor. - Fixed bug with progress saving even in Test Mode. - Fixed the ordering of the buttons for "Uncomplete Level". + - Fixed bug with Prism Button not working when using "Uncomplete Level". - Updated Portuguese Translations. - Updated Czech Translations. - Fixed No Spikes. diff --git a/src/hacks.cpp b/src/hacks.cpp index 65576dc..eae4c85 100644 --- a/src/hacks.cpp +++ b/src/hacks.cpp @@ -1,5 +1,6 @@ #include "hacks.hpp" #include "CustomSettings.hpp" +#include "PrismUI.hpp" std::vector allHacks; @@ -139,7 +140,7 @@ void proceedWithReset(LevelInfoLayer* levelInfoLayer, GJGameLevel* level, bool r level->m_coinsVerified = 0; GLM->deleteLevel(level); levelInfoLayer->onBack(nullptr); - FLAlertLayer::create("Uncompleted Level", fmt::format("The level {} ({}) has been reset!\nYou will need to download it again in order to play it.", level->m_levelName, level->m_levelID.value()), "OK")->show(); + //FLAlertLayer::create("Uncompleted Level", fmt::format("The level {} ({}) has been reset!\nYou will need to download it again in order to play it.", level->m_levelName, level->m_levelID.value()), "OK")->show(); } }, true, true ); @@ -149,6 +150,10 @@ void proceedWithReset(LevelInfoLayer* levelInfoLayer, GJGameLevel* level, bool r #endif void Hacks::resetLevel(LevelInfoLayer* levelInfoLayer, GJGameLevel* level) { + auto prismUIExists = CCScene::get()->getChildByID("prism-menu"); + if (prismUIExists != nullptr) { + static_cast(prismUIExists)->onClose(CCNode::create()); + } #ifdef GEODE_IS_MACOS FLAlertLayer::create("Notice", "This currently does not work on Mac OS\n(you can blame the people who rushed me to work on this)", "OK")->show(); #else