From ec29462356de5ead2cde67cbfdbc8e7226da1c38 Mon Sep 17 00:00:00 2001 From: Cvolton Date: Thu, 20 Jun 2024 12:08:06 +0200 Subject: [PATCH] fix layout deprecations --- src/EditorPauseLayer.cpp | 6 ++---- src/GJScoreCell.cpp | 2 +- src/InfoLayer.cpp | 3 +-- src/LevelLeaderboard.cpp | 3 +-- src/ProfilePage.cpp | 4 ++-- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/EditorPauseLayer.cpp b/src/EditorPauseLayer.cpp index aab02f0..e6a21a6 100644 --- a/src/EditorPauseLayer.cpp +++ b/src/EditorPauseLayer.cpp @@ -234,8 +234,7 @@ class GuidelinesButton : public CCMenuItemSpriteExtra { ->setSameLine(true) ->setBreakLine(true) ->setPrevGap(5.f) - ->setMinScale(.1f) - ->setMaxScale(.5f) + ->setScaleLimits(.1f, .5f) ->setScalePriority(1) ); } @@ -294,8 +293,7 @@ class GuidelinesButton : public CCMenuItemSpriteExtra { for (auto child : CCArrayExt(menu->getChildren())) { child->setLayoutOptions( AxisLayoutOptions::create() - ->setMinScale(.1f) - ->setMaxScale(.5f) + ->setScaleLimits(.1f, .5f) ->setBreakLine(true) ); } diff --git a/src/GJScoreCell.cpp b/src/GJScoreCell.cpp index c5f96b2..e671533 100644 --- a/src/GJScoreCell.cpp +++ b/src/GJScoreCell.cpp @@ -76,7 +76,7 @@ using namespace geode::node_ids; for(auto node: nodes) { if(auto child = m_mainLayer->getChildByID(node)) { auto options = AxisLayoutOptions::create() - ->setMinScale(.1f) + ->setScaleLimits(.1f, 1.f) ->setRelativeScale(child->getScale() ); if(idx++ % 2 == 1) options->setNextGap(7.f); diff --git a/src/InfoLayer.cpp b/src/InfoLayer.cpp index e176930..ff249e8 100644 --- a/src/InfoLayer.cpp +++ b/src/InfoLayer.cpp @@ -108,8 +108,7 @@ using namespace geode::node_ids; for(auto& child : CCArrayExt(menu->getChildren())) { child->setLayoutOptions( AxisLayoutOptions::create() - ->setMinScale(.1f) - ->setMaxScale(.7f) + ->setScaleLimits(.1f, .7f) ); } diff --git a/src/LevelLeaderboard.cpp b/src/LevelLeaderboard.cpp index 13a6999..601a0a7 100644 --- a/src/LevelLeaderboard.cpp +++ b/src/LevelLeaderboard.cpp @@ -101,8 +101,7 @@ using namespace geode::node_ids; for(auto& child : CCArrayExt(modeMenu->getChildren())) { child->setLayoutOptions( AxisLayoutOptions::create() - ->setMinScale(.1f) - ->setMaxScale(.7f) + ->setScaleLimits(.1f, .7f) ); } diff --git a/src/ProfilePage.cpp b/src/ProfilePage.cpp index 22e8233..91c88a1 100644 --- a/src/ProfilePage.cpp +++ b/src/ProfilePage.cpp @@ -187,7 +187,7 @@ struct ProfilePageIDs : Modify { bmFontContainer->setID(fmt::format("{}-label-container", label)); bmFontContainer->setLayoutOptions( AxisLayoutOptions::create() - ->setMinScale(.0f) + ->setScaleLimits(.0f, 1.f) ); bmFont->setPosition({0, bmFontContainer->getContentSize().height / 2}); @@ -198,7 +198,7 @@ struct ProfilePageIDs : Modify { icon->setLayoutOptions( AxisLayoutOptions::create() ->setRelativeScale(.9f) - ->setMinScale(.0f) + ->setScaleLimits(.0f, 1.f) ->setNextGap(10.f) ); if(typeinfo_cast(icon)) {