Skip to content

Commit

Permalink
2.2074 port by user95401
Browse files Browse the repository at this point in the history
  • Loading branch information
Jecket22 authored Dec 15, 2024
2 parents f8bcd50 + ea3ec30 commit d5209f9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 32 deletions.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# 2.0.0 (by user95401)
- Update to v4 of SDK (Geometry Dash 2.2074)
- Freed from Node IDs dependence
- Better way to make offset

# 1.0.0
- Initial commit
20 changes: 6 additions & 14 deletions mod.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
{
"geode": "3.3.0",
"geode": "4.0.1",
"gd": {
"win": "2.206",
"android": "2.206",
"mac": "2.206",
"ios": "2.206"
"win": "2.2074",
"android": "2.2074",
"mac": "2.2074",
"ios": "2.2074"
},
"platform": ["win", "android", "mac"],
"id": "jecket.gauntlets_position_fix",
"name": "Gauntlets Position Fix",
"version": "v1.0.0",
"version": "v2.0.0",
"developer": "Jecket",
"description": "Fixes the positioning for Gauntlet entries.",
"repository": "https://github.com/MathieuAR-GDPSFH/Gauntlets-Position-Fix",
"dependencies": [
{
"id": "geode.node-ids",
"version": ">=v1.13.1",
"importance": "required"
}
],
"tags": [
"bugfix"
]
Expand Down
30 changes: 12 additions & 18 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
#include <Geode/Geode.hpp>
#include <Geode/modify/GauntletSelectLayer.hpp>
using namespace geode::prelude;
class $modify(GauntletSelectLayer) {
bool init(int gt) {
return GauntletSelectLayer::init(gt);
}

void setupGauntlets() {
#include <Geode/modify/GauntletSelectLayer.hpp>//why u guys move this on top ever? - user95401
class $modify(GauntletSelectLayerFix, GauntletSelectLayer) {
$override void setupGauntlets() {
GauntletSelectLayer::setupGauntlets();

auto list = this->getChildByIDRecursive("gauntlets-list");
if (!list) return;

auto pages = typeinfo_cast<CCArray*>(list->getChildByID("gauntlet-pages")->getChildren());
if (pages->count() == 0) return;

auto page = typeinfo_cast<CCMenu*>(typeinfo_cast<CCLayer*>(pages->objectAtIndex(0))->getChildren()->objectAtIndex(0));
if (pages->count() == 1) {
page->setPosition({-285.f, page->getPosition().y});
}
}
findFirstChildRecursive<ExtendedLayer>(this,
[](ExtendedLayer* gauntlet_pages) {
if (gauntlet_pages->getChildrenCount() > 1) return false;
gauntlet_pages->setAnchorPoint(CCPointMake(1.f, 0.f));
gauntlet_pages->ignoreAnchorPointForPosition(false);
return true;
}
);
};
};

0 comments on commit d5209f9

Please sign in to comment.