From 781310458d9d9974f012071d1bfd1d54d2cfe6a4 Mon Sep 17 00:00:00 2001 From: Cvolton Date: Sun, 14 Apr 2024 10:25:40 +0200 Subject: [PATCH] Update EditorUI positioning logic to fix mod compatibility regressions --- changelog.md | 3 +++ mod.json | 2 +- src/EditorUI.cpp | 6 ++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/changelog.md b/changelog.md index c84bf84..375b2be 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,7 @@ # Node IDs Changelog +## v1.9.1 +* Updated EditorUI positioning logic to fix mod compatibility regressions + ## v1.9.0 * Added batch-layer for GJBaseGameLayer * Added GauntletSelectLayer (thanks @SpaghettDev and @ninXout) diff --git a/mod.json b/mod.json index 97d7a54..5f35b69 100644 --- a/mod.json +++ b/mod.json @@ -5,7 +5,7 @@ "android": "2.205", "mac": "2.200" }, - "version": "v1.9.0", + "version": "v1.9.1", "id": "geode.node-ids", "name": "Node IDs", "developer": "Geode Team", diff --git a/src/EditorUI.cpp b/src/EditorUI.cpp index 262f88d..81a95b8 100644 --- a/src/EditorUI.cpp +++ b/src/EditorUI.cpp @@ -125,9 +125,8 @@ using namespace geode::node_ids; menu->getChildByID("zoom-out-button"), menu->getChildByID("zoom-in-button") ); - zoomMenu->setAnchorPoint({0.5f, 1.f}); - zoomMenu->setPositionY(playTestMenu->getPositionY() - 30); zoomMenu->setContentSize({ 50.f, zoomMenuHeight }); + zoomMenu->setPositionY(playTestMenu->getPositionY() - 30 - (zoomMenu->getContentHeight() / 2)); zoomMenu->updateLayout(); auto linkMenu = detachAndCreateMenu( @@ -140,9 +139,8 @@ using namespace geode::node_ids; menu->getChildByID("unlink-button"), menu->getChildByID("link-button") ); - linkMenu->setAnchorPoint({0.5f, 1.f}); - linkMenu->setPositionY(playTestMenu->getPositionY() - 30); linkMenu->setContentSize({ 125.f, zoomMenuHeight }); + linkMenu->setPositionY(playTestMenu->getPositionY() - 30 - (linkMenu->getContentHeight() / 2)); linkMenu->updateLayout(); menu->setPosition(42.f, 45.f);