From 4c649baf160120cf3099011e7b9916dede45f45a Mon Sep 17 00:00:00 2001 From: Cvolton Date: Sat, 16 Mar 2024 03:21:29 +0100 Subject: [PATCH] fix reward room alignment --- mod.json | 2 +- src/SecretRewardsLayer.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mod.json b/mod.json index 740534c..4a5b027 100644 --- a/mod.json +++ b/mod.json @@ -5,7 +5,7 @@ "android": "2.205", "mac": "2.200" }, - "version": "v1.8.0", + "version": "v1.8.1", "id": "geode.node-ids", "name": "Node IDs", "developer": "Geode Team", diff --git a/src/SecretRewardsLayer.cpp b/src/SecretRewardsLayer.cpp index c25d5fd..e7aeb61 100644 --- a/src/SecretRewardsLayer.cpp +++ b/src/SecretRewardsLayer.cpp @@ -35,6 +35,8 @@ void assignIDsToStore(CCMenuItemSpriteExtra* store, int storeNum) { } void assignIDsToPage(CCLayer* page, int pageNum) { + auto winSize = CCDirector::sharedDirector()->getWinSize(); + page->setID("page" + std::to_string(pageNum + 1)); if (pageNum == 3) { // store page @@ -42,10 +44,10 @@ void assignIDsToPage(CCLayer* page, int pageNum) { menu->setID("store-menu"); // make this a row layout in case people want to add their own shops here - menu->setPosition(285.f, 220.f); + menu->setPosition(winSize.width / 2, winSize.height - 100); menu->setLayout( RowLayout::create() - ->setGap(25.f) + ->setGap(24.f) ); menu->updateLayout();