Skip to content

Commit

Permalink
fix layout deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Jun 20, 2024
1 parent edaa7c8 commit ec29462
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
6 changes: 2 additions & 4 deletions src/EditorPauseLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,7 @@ class GuidelinesButton : public CCMenuItemSpriteExtra {
->setSameLine(true)
->setBreakLine(true)
->setPrevGap(5.f)
->setMinScale(.1f)
->setMaxScale(.5f)
->setScaleLimits(.1f, .5f)
->setScalePriority(1)
);
}
Expand Down Expand Up @@ -294,8 +293,7 @@ class GuidelinesButton : public CCMenuItemSpriteExtra {
for (auto child : CCArrayExt<CCNode*>(menu->getChildren())) {
child->setLayoutOptions(
AxisLayoutOptions::create()
->setMinScale(.1f)
->setMaxScale(.5f)
->setScaleLimits(.1f, .5f)
->setBreakLine(true)
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/GJScoreCell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions src/InfoLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ using namespace geode::node_ids;
for(auto& child : CCArrayExt<CCNode*>(menu->getChildren())) {
child->setLayoutOptions(
AxisLayoutOptions::create()
->setMinScale(.1f)
->setMaxScale(.7f)
->setScaleLimits(.1f, .7f)
);
}

Expand Down
3 changes: 1 addition & 2 deletions src/LevelLeaderboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ using namespace geode::node_ids;
for(auto& child : CCArrayExt<CCNode*>(modeMenu->getChildren())) {
child->setLayoutOptions(
AxisLayoutOptions::create()
->setMinScale(.1f)
->setMaxScale(.7f)
->setScaleLimits(.1f, .7f)
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/ProfilePage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ struct ProfilePageIDs : Modify<ProfilePageIDs, ProfilePage> {
bmFontContainer->setID(fmt::format("{}-label-container", label));
bmFontContainer->setLayoutOptions(
AxisLayoutOptions::create()
->setMinScale(.0f)
->setScaleLimits(.0f, 1.f)
);

bmFont->setPosition({0, bmFontContainer->getContentSize().height / 2});
Expand All @@ -198,7 +198,7 @@ struct ProfilePageIDs : Modify<ProfilePageIDs, ProfilePage> {
icon->setLayoutOptions(
AxisLayoutOptions::create()
->setRelativeScale(.9f)
->setMinScale(.0f)
->setScaleLimits(.0f, 1.f)
->setNextGap(10.f)
);
if(typeinfo_cast<CCMenuItemSpriteExtra*>(icon)) {
Expand Down

0 comments on commit ec29462

Please sign in to comment.