Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/geode-sdk/NodeIDs into main
Browse files Browse the repository at this point in the history
  • Loading branch information
HJfod committed Feb 6, 2024
2 parents 335c3b6 + 393f29d commit 4d6a9d9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
- name: Windows
os: windows-latest

#- name: macOS
# os: macos-latest
- name: macOS
os: macos-latest

- name: Android32
os: ubuntu-latest
Expand Down
9 changes: 8 additions & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,12 @@
"issues": {
"url": "https://github.com/geode-sdk/NodeIDs/issues",
"info": "If you encounter an issue related to node id mismatches, please report it to the GitHub issues page."
}
},
"incompatibilities": [
{
"id": "beat.click-sound",
"version": "<=1.3.1",
"importance": "breaking"
}
]
}
41 changes: 12 additions & 29 deletions src/PauseLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,7 @@ CCNode* getChildBySpriteFrameName(CCNode* parent, const char* name) {
this,
idx,
"background",
"level-name",

"normal-progress-bar",
"practice-progress-bar",
"normal-progress-label",
"practice-progress-label",
"normal-mode-label",
"practice-mode-label",

"center-button-menu",

"music-slider",
"sfx-slider",
"music-label",
"sfx-label"
"level-name"
);
idx += 2;

Expand Down Expand Up @@ -84,26 +70,23 @@ CCNode* getChildBySpriteFrameName(CCNode* parent, const char* name) {
idx += 6;
}

if (this->getChildrenCount() == idx + 5 + 1 + controller * 3) {
setIDs(
this,
idx,
"practice-arrow-text"
);
setIDSafe(this, idx, "center-button-menu");
idx += 1;

if(auto practiceTxt = getChildBySpriteFrameName(this, "GJ_practiceTxt_001.png")) {
practiceTxt->setID("practice-arrow-text");
idx += 1;
}

setIDs(
this,
idx,
"center-button-menu",

"music-slider",
"sfx-slider",
"music-label",
"sfx-label"
);
idx += 5;
idx += 4;

if (controller) {
setIDs(
Expand All @@ -126,8 +109,8 @@ CCNode* getChildBySpriteFrameName(CCNode* parent, const char* name) {
->setCrossAxisOverflow(false)
);
leftMenu->setID("left-button-menu");
leftMenu->setPosition({(winSize.width / 2) - 240.f, (winSize.height / 2)});
leftMenu->setContentSize({40, 280});
leftMenu->setPosition({36.f, (winSize.height / 2)});
leftMenu->setContentSize({40, winSize.height - 40.f});
leftMenu->setZOrder(10);
this->addChild(leftMenu);

Expand All @@ -140,8 +123,8 @@ CCNode* getChildBySpriteFrameName(CCNode* parent, const char* name) {
->setCrossAxisOverflow(false)
);
rightMenu->setID("right-button-menu");
rightMenu->setPosition({(winSize.width / 2) + 240.f, (winSize.height / 2)});
rightMenu->setContentSize({40, 280});
rightMenu->setPosition({winSize.width - 36.f, (winSize.height / 2)});
rightMenu->setContentSize({40, winSize.height - 40.f});
rightMenu->setZOrder(10);
this->addChild(rightMenu);

Expand All @@ -153,7 +136,7 @@ CCNode* getChildBySpriteFrameName(CCNode* parent, const char* name) {
->setCrossAxisOverflow(false)
);
bottomMenu->setID("bottom-button-menu");
bottomMenu->setPosition({(winSize.width / 2), (winSize.height / 2) - 130.f});
bottomMenu->setPosition({(winSize.width / 2), 30.f});
bottomMenu->setContentSize({400, 30});
bottomMenu->setZOrder(10);
this->addChild(bottomMenu);
Expand Down

0 comments on commit 4d6a9d9

Please sign in to comment.