Skip to content

Commit

Permalink
fix SetGroupIDLayer
Browse files Browse the repository at this point in the history
  • Loading branch information
HJfod committed Feb 15, 2024
1 parent 6862538 commit 7bbb5e6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"android": "2.205",
"mac": "2.200"
},
"version": "v1.5.0",
"version": "v1.5.1",
"id": "geode.node-ids",
"name": "Node IDs",
"developer": "Geode Team",
Expand Down
25 changes: 17 additions & 8 deletions src/SetGroupIDLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ static void offsetChildren(CCMenu* target, CCPoint const& offset) {
);

if (auto menu = m_mainLayer->getChildByID("groups-list-menu")) {
int offset = 0;

setIDs(
menu, 0,
menu, &offset,
"ok-button",
"editor-layer-next-free-button",
"editor-layer-2-next-free-button",
Expand All @@ -64,8 +66,15 @@ static void offsetChildren(CCMenu* target, CCPoint const& offset) {
"add-group-id-prev-button",
"add-group-id-next-button",
"next-free-button",
"add-group-id-button",
"add-group-parent-button",
"add-group-id-button"
);

if (m_targetObject) {
setIDs(menu, &offset, "add-group-parent-button");
}

setIDs(
menu, &offset,
"z-order-prev-button",
"z-order-next-button",
"b5-layer-button",
Expand All @@ -80,21 +89,21 @@ static void offsetChildren(CCMenu* target, CCPoint const& offset) {
"default-layer-button"
);

int offset = 25;

if (m_showChannelOrder) {
setIDs(
menu, offset,
menu, &offset,
"channel-order-prev-button",
"channel-order-next-button",
"channel-prev-button",
"channel-next-button",
"channel-next-free-button"
);
offset += 5;
}

offset += m_groupIDObjects->count();

setIDs(
menu, offset,
menu, &offset,
"copy-button",
"paste-button",
"extra-button",
Expand Down

0 comments on commit 7bbb5e6

Please sign in to comment.