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