From 2cdda2ca2dde0baf1284338c424a6c2ed4a0c0f6 Mon Sep 17 00:00:00 2001 From: Explodingbill Date: Thu, 14 Nov 2024 21:20:19 +1100 Subject: [PATCH] its all just complete fucking luck --- .github/workflows/build.yml | 4 ++-- changelog.md | 3 +++ src/Client/Windows/Labels.cpp | 27 ++++++++++++--------------- src/Utils/OffsetManager.cpp | 4 +++- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3704cd95..222a0caf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,8 +20,8 @@ jobs: - name: Android64 os: ubuntu-latest target: Android64 - - name: macOS - os: macos-latest + #- name: macOS + # os: macos-latest name: ${{ matrix.config.name }} diff --git a/changelog.md b/changelog.md index 15ceb897..399311bd 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,9 @@ # 1.7.5-beta.2 - Fixed crash closing the mod menu +- Fixed crash when adding labels +- Fixed label toggle box appearing in the wrong position when theres only 1 label +- Minor label UI changes - Removed editor set scale and rotation # 1.7.5-beta.1 diff --git a/src/Client/Windows/Labels.cpp b/src/Client/Windows/Labels.cpp index 6b50221d..08c908a7 100644 --- a/src/Client/Windows/Labels.cpp +++ b/src/Client/Windows/Labels.cpp @@ -306,7 +306,7 @@ void Labels::refreshList() deleteBtn->setPositionY(cell->getContentHeight() / 2); deleteBtn->setUserData(module); - bool single = i == 0 || i == modules.size() - 1; + bool single = false;// i == 0 || i == modules.size() - 1; auto arrowBack = CCScale9Sprite::create("square02_small.png"); arrowBack->setOpacity(100); @@ -338,26 +338,24 @@ void Labels::refreshList() if (i == 0) { - moveUp->setVisible(false); - moveDown->setPosition(arrowBack->getPosition()); + moveUp->setEnabled(false); + as(moveUp->getNormalImage())->setOpacity(150); } else if (i == modules.size() - 1) { - moveDown->setVisible(false); - moveUp->setPosition(arrowBack->getPosition()); + moveDown->setEnabled(false); + as(moveDown->getNormalImage())->setOpacity(150); } - else - { - #define GAP_ARROWS_BOTH 8 - moveUp->setPosition(arrowBack->getPosition() + ccp(GAP_ARROWS_BOTH, 0)); - moveDown->setPosition(arrowBack->getPosition() + ccp(-GAP_ARROWS_BOTH, 0)); - } + #define GAP_ARROWS_BOTH 8 + + moveUp->setPosition(arrowBack->getPosition() + ccp(GAP_ARROWS_BOTH, 0)); + moveDown->setPosition(arrowBack->getPosition() + ccp(-GAP_ARROWS_BOTH, 0)); auto toggleBtn = CCMenuItemToggler::createWithStandardSprites(this, menu_selector(Labels::onToggleVisible), 0.45f); toggleBtn->setUserData(module); toggleBtn->toggle(lbl->visible); - toggleBtn->setPosition(arrowBack->getPosition() + ccp(-arrowBack->getScaledContentWidth() / 2, 0) + ccp(-12, 0)); + toggleBtn->setPosition(arrowBack->getPosition() + ccp(-arrowBack->getScaledContentWidth() / 2, 0) + ccp(-12, 0) + ccp(modules.size() == 1 ? 41 : 0, 0)); auto toggleBG = CCScale9Sprite::create("square02_small.png"); toggleBG->setOpacity(100); @@ -411,13 +409,12 @@ void Labels::save() Mod::get()->setSavedValue("safe-zone.width", safeZone.size.width); Mod::get()->setSavedValue("safe-zone.height", safeZone.size.height); - auto arr = matjson::Value{}; - arr.array(); + std::vector arr; for (auto module : modules) { if (auto lblMod = typeinfo_cast(module)) - arr.asArray().unwrap().push_back(lblMod->saveToObject()); + arr.push_back(lblMod->saveToObject()); } Mod::get()->setSavedValue("selected-labels", arr); diff --git a/src/Utils/OffsetManager.cpp b/src/Utils/OffsetManager.cpp index ad101beb..7f0f3972 100644 --- a/src/Utils/OffsetManager.cpp +++ b/src/Utils/OffsetManager.cpp @@ -22,7 +22,8 @@ unsigned int OffsetManager::offsetForType(PatchType type) GEODE_WINDOWS(return 0x607008); GEODE_ANDROID32(return 0x4740f0 - 0x10000); GEODE_ANDROID64(return 0x9473c0 - 0x100000); - GEODE_INTEL_MAC(return ); + GEODE_INTEL_MAC(return 0x7ff4d8); + GEODE_ARM_MAC(return ); GEODE_IOS(return ); #endif @@ -39,6 +40,7 @@ unsigned int OffsetManager::offsetForType(PatchType type) GEODE_ANDROID32(return 0x46ce38 - 0x10000); GEODE_ANDROID64(return 0x9384b8 - 0x100000); GEODE_INTEL_MAC(return 0x823b00); + GEODE_ARM_MAC(return ); GEODE_IOS(return 0x642b60); #endif