Skip to content

Commit 2cdda2c

Browse files
committed
its all just complete fucking luck
1 parent 1d6db52 commit 2cdda2c

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
- name: Android64
2121
os: ubuntu-latest
2222
target: Android64
23-
- name: macOS
24-
os: macos-latest
23+
#- name: macOS
24+
# os: macos-latest
2525

2626

2727
name: ${{ matrix.config.name }}

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# 1.7.5-beta.2
22

33
- Fixed crash closing the mod menu
4+
- Fixed crash when adding labels
5+
- Fixed label toggle box appearing in the wrong position when theres only 1 label
6+
- Minor label UI changes
47
- Removed editor set scale and rotation
58

69
# 1.7.5-beta.1

src/Client/Windows/Labels.cpp

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ void Labels::refreshList()
306306
deleteBtn->setPositionY(cell->getContentHeight() / 2);
307307
deleteBtn->setUserData(module);
308308

309-
bool single = i == 0 || i == modules.size() - 1;
309+
bool single = false;// i == 0 || i == modules.size() - 1;
310310

311311
auto arrowBack = CCScale9Sprite::create("square02_small.png");
312312
arrowBack->setOpacity(100);
@@ -338,26 +338,24 @@ void Labels::refreshList()
338338

339339
if (i == 0)
340340
{
341-
moveUp->setVisible(false);
342-
moveDown->setPosition(arrowBack->getPosition());
341+
moveUp->setEnabled(false);
342+
as<CCSprite*>(moveUp->getNormalImage())->setOpacity(150);
343343
}
344344
else if (i == modules.size() - 1)
345345
{
346-
moveDown->setVisible(false);
347-
moveUp->setPosition(arrowBack->getPosition());
346+
moveDown->setEnabled(false);
347+
as<CCSprite*>(moveDown->getNormalImage())->setOpacity(150);
348348
}
349-
else
350-
{
351-
#define GAP_ARROWS_BOTH 8
352349

353-
moveUp->setPosition(arrowBack->getPosition() + ccp(GAP_ARROWS_BOTH, 0));
354-
moveDown->setPosition(arrowBack->getPosition() + ccp(-GAP_ARROWS_BOTH, 0));
355-
}
350+
#define GAP_ARROWS_BOTH 8
351+
352+
moveUp->setPosition(arrowBack->getPosition() + ccp(GAP_ARROWS_BOTH, 0));
353+
moveDown->setPosition(arrowBack->getPosition() + ccp(-GAP_ARROWS_BOTH, 0));
356354

357355
auto toggleBtn = CCMenuItemToggler::createWithStandardSprites(this, menu_selector(Labels::onToggleVisible), 0.45f);
358356
toggleBtn->setUserData(module);
359357
toggleBtn->toggle(lbl->visible);
360-
toggleBtn->setPosition(arrowBack->getPosition() + ccp(-arrowBack->getScaledContentWidth() / 2, 0) + ccp(-12, 0));
358+
toggleBtn->setPosition(arrowBack->getPosition() + ccp(-arrowBack->getScaledContentWidth() / 2, 0) + ccp(-12, 0) + ccp(modules.size() == 1 ? 41 : 0, 0));
361359

362360
auto toggleBG = CCScale9Sprite::create("square02_small.png");
363361
toggleBG->setOpacity(100);
@@ -411,13 +409,12 @@ void Labels::save()
411409
Mod::get()->setSavedValue<float>("safe-zone.width", safeZone.size.width);
412410
Mod::get()->setSavedValue<float>("safe-zone.height", safeZone.size.height);
413411

414-
auto arr = matjson::Value{};
415-
arr.array();
412+
std::vector<matjson::Value> arr;
416413

417414
for (auto module : modules)
418415
{
419416
if (auto lblMod = typeinfo_cast<LabelModule*>(module))
420-
arr.asArray().unwrap().push_back(lblMod->saveToObject());
417+
arr.push_back(lblMod->saveToObject());
421418
}
422419

423420
Mod::get()->setSavedValue<matjson::Value>("selected-labels", arr);

src/Utils/OffsetManager.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ unsigned int OffsetManager::offsetForType(PatchType type)
2222
GEODE_WINDOWS(return 0x607008);
2323
GEODE_ANDROID32(return 0x4740f0 - 0x10000);
2424
GEODE_ANDROID64(return 0x9473c0 - 0x100000);
25-
GEODE_INTEL_MAC(return );
25+
GEODE_INTEL_MAC(return 0x7ff4d8);
26+
GEODE_ARM_MAC(return );
2627
GEODE_IOS(return );
2728

2829
#endif
@@ -39,6 +40,7 @@ unsigned int OffsetManager::offsetForType(PatchType type)
3940
GEODE_ANDROID32(return 0x46ce38 - 0x10000);
4041
GEODE_ANDROID64(return 0x9384b8 - 0x100000);
4142
GEODE_INTEL_MAC(return 0x823b00);
43+
GEODE_ARM_MAC(return );
4244
GEODE_IOS(return 0x642b60);
4345

4446
#endif

0 commit comments

Comments
 (0)