Skip to content

Commit

Permalink
feat(rl-button): Fixed incompatibility with ninxout.redash
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaghettDev committed Dec 5, 2024
1 parent 7b514e0 commit 9d42802
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
1 change: 1 addition & 0 deletions ABOUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
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.2074",
"mac": "2.2074"
},
"version": "v3.0.1",
"version": "v3.0.2",
"id": "spaghettdev.gd-roulette",
"name": "GD-Roulette",
"developer": "SpaghettDev",
Expand Down
2 changes: 1 addition & 1 deletion src/layers/CreatorLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
18 changes: 9 additions & 9 deletions src/roulette/manager/RouletteManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<CreatorLayer>(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()
Expand Down

0 comments on commit 9d42802

Please sign in to comment.