From 9d42802f4dc8ef766f532279a7b29477859e6bb3 Mon Sep 17 00:00:00 2001 From: SpaghettDev <37266659+SpaghettDev@users.noreply.github.com> Date: Thu, 5 Dec 2024 14:21:48 -0500 Subject: [PATCH] feat(rl-button): Fixed incompatibility with ninxout.redash --- ABOUT.md | 1 + CHANGELOG.md | 6 ++++++ mod.json | 2 +- src/layers/CreatorLayer.cpp | 2 +- src/roulette/manager/RouletteManager.hpp | 18 +++++++++--------- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/ABOUT.md b/ABOUT.md index 6b3db18..b3029ec 100644 --- a/ABOUT.md +++ b/ABOUT.md @@ -10,6 +10,7 @@ A Geometry Dash Level Roulette. - GD List - Skip levels you can't beat - Auto pause after reaching the goal percentage (can be disabled) +- Resume playing after leaving the game ## How To Play diff --git a/CHANGELOG.md b/CHANGELOG.md index 13d184c..6a00c8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [3.0.2] - 2024-12-05 + +### Fixed + +- Incompatibility with Ninxout's Overcharged Menu + ## [3.0.1] - 2024-11-28 ### Fixed diff --git a/mod.json b/mod.json index 664002d..27c5335 100644 --- a/mod.json +++ b/mod.json @@ -5,7 +5,7 @@ "android": "2.2074", "mac": "2.2074" }, - "version": "v3.0.1", + "version": "v3.0.2", "id": "spaghettdev.gd-roulette", "name": "GD-Roulette", "developer": "SpaghettDev", diff --git a/src/layers/CreatorLayer.cpp b/src/layers/CreatorLayer.cpp index c371f47..2846a26 100644 --- a/src/layers/CreatorLayer.cpp +++ b/src/layers/CreatorLayer.cpp @@ -12,7 +12,7 @@ class $modify(RouletteButton, CreatorLayer) if (g_rouletteManager.rouletteLayer = RLRouletteLayer::create(); g_rouletteManager.rouletteLayer) g_rouletteManager.rouletteLayer->show(); - if (auto exMark = this->getChildByID("center-left-menu"_spr)->getChildByID("roulette-button"_spr)->getChildByID("exclamation-mark")) + if (auto exMark = this->getChildByIDRecursive("exclamation-mark"_spr)) exMark->removeFromParent(); } diff --git a/src/roulette/manager/RouletteManager.hpp b/src/roulette/manager/RouletteManager.hpp index cf759f8..54b4bf7 100644 --- a/src/roulette/manager/RouletteManager.hpp +++ b/src/roulette/manager/RouletteManager.hpp @@ -56,19 +56,19 @@ struct RouletteManager void addExclamationMark(CCMenuItemSpriteExtra* button = nullptr) { + auto parent = button + ? button + : rouletteLayer->getParent()->getChildByIDRecursive("roulette-button"_spr); + auto exclamationSprite = CCSprite::createWithSpriteFrameName( "exMark_001.png" ); exclamationSprite->setScale(.6f); - exclamationSprite->setID("exclamation-mark"); - (button - ? button - : rouletteLayer - ->getParent() - ->getChildByType(0) - ->getChildByID("center-left-menu"_spr) - ->getChildByID("roulette-button"_spr) - )->addChild(exclamationSprite); + exclamationSprite->setID("exclamation-mark"_spr); + parent->addChild(exclamationSprite); + + if (Loader::get()->isModLoaded("ninxout.redash") && !parent->getLayout()) + exclamationSprite->getParent()->setLayout(AnchorLayout::create()); exclamationSprite->setLayoutOptions( AnchorLayoutOptions::create()