Skip to content

Commit

Permalink
its all just complete fucking luck
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSillyDoggo committed Nov 14, 2024
1 parent 1d6db52 commit 2cdda2c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
27 changes: 12 additions & 15 deletions src/Client/Windows/Labels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -338,26 +338,24 @@ void Labels::refreshList()

if (i == 0)
{
moveUp->setVisible(false);
moveDown->setPosition(arrowBack->getPosition());
moveUp->setEnabled(false);
as<CCSprite*>(moveUp->getNormalImage())->setOpacity(150);
}
else if (i == modules.size() - 1)
{
moveDown->setVisible(false);
moveUp->setPosition(arrowBack->getPosition());
moveDown->setEnabled(false);
as<CCSprite*>(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);
Expand Down Expand Up @@ -411,13 +409,12 @@ void Labels::save()
Mod::get()->setSavedValue<float>("safe-zone.width", safeZone.size.width);
Mod::get()->setSavedValue<float>("safe-zone.height", safeZone.size.height);

auto arr = matjson::Value{};
arr.array();
std::vector<matjson::Value> arr;

for (auto module : modules)
{
if (auto lblMod = typeinfo_cast<LabelModule*>(module))
arr.asArray().unwrap().push_back(lblMod->saveToObject());
arr.push_back(lblMod->saveToObject());
}

Mod::get()->setSavedValue<matjson::Value>("selected-labels", arr);
Expand Down
4 changes: 3 additions & 1 deletion src/Utils/OffsetManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 2cdda2c

Please sign in to comment.