Skip to content

Commit

Permalink
optimizations?
Browse files Browse the repository at this point in the history
  • Loading branch information
RayDeeUx committed Jul 10, 2024
1 parent 551b3da commit 6cc29f4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,12 @@ class $modify(MyEndLevelLayer, EndLevelLayer) {
if (MyEndLevelLayer::getModBool("hideEndLevelLayer")) {
if (auto mainLayer = getChildByIDRecursive("main-layer")) {
mainLayer->setVisible(false);
MyEndLevelLayer::getHideButtonSprite()->setVisible(false); // NEVER set hideLayerMenu as invisible!
}
auto hideELLSprite = CCSprite::create("btn.png"_spr);
hideELLSprite->setScaleX(desiredSpriteScaleX);
hideELLSprite->setScaleY(desiredSpriteScaleY);
hideELLSprite->setID("hide-endlevellayer-sprite"_spr);
if (MyEndLevelLayer::getModBool("hideHideEndscreen")) {
hideELLSprite->setVisible(false);
}
hideELLSprite->setVisible(MyEndLevelLayer::getHideButtonSprite()->isVisible());
auto hideELLBtn = CCMenuItemSpriteExtra::create(hideELLSprite, this, menu_selector(MyEndLevelLayer::toggleMainLayerVisibility));
hideELLBtn->setScale(desiredButtonScale);
hideELLBtn->setID("hide-endlevellayer-button"_spr);
Expand Down

0 comments on commit 6cc29f4

Please sign in to comment.