diff --git a/mod.json b/mod.json index 5bb6c13..a198c3d 100644 --- a/mod.json +++ b/mod.json @@ -1,5 +1,5 @@ { - "geode": "3.1.0", + "geode": "3.1.1", "gd": { "win": "2.206", "android": "2.206", diff --git a/src/CustomizeObjectLayer.cpp b/src/CustomizeObjectLayer.cpp index f804e26..7e39b3a 100644 --- a/src/CustomizeObjectLayer.cpp +++ b/src/CustomizeObjectLayer.cpp @@ -229,12 +229,18 @@ using namespace geode::node_ids; textActionsMenu->setPositionX(winSize.width / 2 + 110.f); textActionsMenu->updateLayout(); - auto clearTextMenu = detachAndCreateMenu( + if(auto clearTextMenu = detachAndCreateMenu( m_mainLayer, "clear-text-menu", nullptr, m_buttonMenu->getChildByID("clear-text-button") - ); + )) { + //the position being incorrect has something to do with anchor points and ignoreAnchorPointForPosition + //if the anchor point of the menu was {1,0} and it actually worked, it'd be correct + //but that's not what's happening so whatever + //dont care enough, this fixes it + if(auto btn = clearTextMenu->getChildByID("clear-text-button")) btn->setPosition({winSize / 2}); + } auto infoMenu = detachAndCreateMenu( m_mainLayer,