Skip to content

Commit 1221ab2

Browse files
committed
omg pls...
1 parent e9e99be commit 1221ab2

19 files changed

Lines changed: 25 additions & 20 deletions

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ else()
88
endif()
99
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
1010

11-
project(HorribleMenu VERSION 1.0.1)
11+
project(HorribleMenu VERSION 1.0.2)
1212

1313
file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS src/*.cpp)
1414
add_library(${PROJECT_NAME} SHARED ${SOURCES})

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# v1.0.2
2+
- Fix UI ordering issues
3+
14
# v1.0.1
25
- Fix file path issues with *Mock your 90%+ Fail* option on Android
36

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"id": "cubicstudios.horriblemenu",
1010
"name": "Horrible Menu",
11-
"version": "1.0.1",
11+
"version": "1.0.2",
1212
"developers": [
1313
"Team Breakeode",
1414
"Cheeseworks",

src/Utils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727

2828
#include <Geode/binding/FMODAudioEngine.hpp>
2929

30+
#define HIGHEST_Z cocos2d::CCScene::get()->getHighestChildZ() + 1
31+
3032
// Additional utility methods for Horrible Menu
3133
namespace horrible {
3234
// Pointer to this Geode mod

src/hooks/Mock.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class $modify(MockMenuLayer, MenuLayer) {
105105
});
106106

107107
ss->loadFromFile(pngPath);
108-
addChild(ss, 999);
108+
addChild(ss, HIGHEST_Z);
109109
} else {
110110
log::error("ID is invalid");
111111
};

src/hooks/Parry.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static auto const o = Option::create(THIS_ID)
112112
// m_fields->m_parryBar->setAnchorPoint({ 0.5f, 0.5f });
113113
// m_fields->m_parryBar->setVisible(false);
114114

115-
// addChild(m_fields->m_parryBar, 9999);
115+
// m_uiLayer->addChild(m_fields->m_parryBar);
116116
// };
117117

118118
// if (!m_fields->m_parryLabel) {
@@ -123,7 +123,7 @@ static auto const o = Option::create(THIS_ID)
123123
// m_fields->m_parryLabel->setVisible(false);
124124
// m_fields->m_parryLabel->setID("parry_label"_spr);
125125

126-
// addChild(m_fields->m_parryLabel, 10000);
126+
// m_uiLayer->addChild(m_fields->m_parryLabel);
127127
// };
128128

129129
// scheduleUpdate();

src/hooks/Sticky.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class $modify(StickyPlayerObject, PlayerObject) {
5050
CCDelayTime::create(0.125f),
5151
nullptr);
5252

53-
pl->m_uiLayer->addChild(f->m_clickLabel, 9);
53+
pl->m_uiLayer->addChild(f->m_clickLabel, HIGHEST_Z);
5454
f->m_clickLabel->runAction(CCRepeatForever::create(seq));
5555
};
5656

src/hooks/obstructive/BlackScreen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class $modify(BlackScreenPlayLayer, PlayLayer) {
4141
blackScreen->setContentSize(winSize);
4242
blackScreen->setPosition(winSize / 2.f);
4343

44-
m_uiLayer->addChild(blackScreen, 99);
44+
m_uiLayer->addChild(blackScreen, HIGHEST_Z);
4545

4646
// Schedule removal after 0.5 seconds, then schedule to show again after a random delay
4747
blackScreen->runAction(CCSequence::createWithTwoActions(

src/hooks/obstructive/Confetti.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class $modify(ConfettiPlayLayer, PlayLayer) {
7878
CCSpawn::createWithTwoActions(move, rotate),
7979
CCCallFuncN::create(this, callfuncN_selector(ConfettiPlayLayer::cleanConfetti)));
8080

81-
m_uiLayer->addChild(conf, 9);
81+
m_uiLayer->addChild(conf, HIGHEST_Z);
8282
conf->runAction(seq);
8383
};
8484

src/hooks/obstructive/Friends.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class $modify(FriendsPlayLayer, PlayLayer) {
7575
auto friendAction = CCSequence::createWithTwoActions(action, finish);
7676
auto scheduleAction = CCCallFunc::create(this, callfunc_selector(FriendsPlayLayer::scheduleNextFriend));
7777

78-
m_uiLayer->addChild(friendSpr, 9);
78+
m_uiLayer->addChild(friendSpr, HIGHEST_Z);
7979
friendSpr->runAction(CCSpawn::createWithTwoActions(friendAction, scheduleAction));
8080
};
8181

0 commit comments

Comments
 (0)