From 2ac6d72fb2f283599336902c964edc279ca321fd Mon Sep 17 00:00:00 2001 From: Cvolton Date: Tue, 6 Feb 2024 11:52:06 +0100 Subject: [PATCH 1/3] fix misaligned PauseLayer IDs --- mod.json | 9 ++++++++- src/PauseLayer.cpp | 31 +++++++------------------------ 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/mod.json b/mod.json index 66a7838..ea00531 100644 --- a/mod.json +++ b/mod.json @@ -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" + } + ] } diff --git a/src/PauseLayer.cpp b/src/PauseLayer.cpp index 54a1a2d..a731464 100644 --- a/src/PauseLayer.cpp +++ b/src/PauseLayer.cpp @@ -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; @@ -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-text"); idx += 1; } setIDs( this, idx, - "center-button-menu", - "music-slider", "sfx-slider", "music-label", "sfx-label" ); - idx += 5; + idx += 4; if (controller) { setIDs( From 6a61f91d92964662d1f99179d54200641aaf5f9d Mon Sep 17 00:00:00 2001 From: Cvolton Date: Tue, 6 Feb 2024 12:09:34 +0100 Subject: [PATCH 2/3] Fix PauseLayer misalignments on different aspect ratios --- src/PauseLayer.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/PauseLayer.cpp b/src/PauseLayer.cpp index a731464..440c532 100644 --- a/src/PauseLayer.cpp +++ b/src/PauseLayer.cpp @@ -74,7 +74,7 @@ CCNode* getChildBySpriteFrameName(CCNode* parent, const char* name) { idx += 1; if(auto practiceTxt = getChildBySpriteFrameName(this, "GJ_practiceTxt_001.png")) { - practiceTxt->setID("practice-text"); + practiceTxt->setID("practice-arrow-text"); idx += 1; } @@ -109,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); @@ -123,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); @@ -136,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); From 393f29d86c8f010e8c2e7c8cf63705626dc22bc1 Mon Sep 17 00:00:00 2001 From: Cvolton Date: Tue, 6 Feb 2024 12:11:39 +0100 Subject: [PATCH 3/3] try enable mac build --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3fe6adf..5e59703 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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