Skip to content
This repository was archived by the owner on Apr 10, 2026. It is now read-only.

Commit c04bf03

Browse files
committed
One more fix
1 parent f8b2e3b commit c04bf03

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

include/PageMenu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct PAGES_API_DLL PageMenu : public geode::Modify<PageMenu, cocos2d::CCMenu>
4141
void setMax(float max);
4242
void enablePages(bool enable);
4343
void setButtonScale(float scale);
44-
void setFixed(bool fixed);
44+
void setFixed(float max);
4545

4646
private:
4747
void nextPage(cocos2d::CCObject* obj);

src/PageMenu.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,16 @@ void PageMenu::enablePages(bool enabled) {
5858
}
5959
}
6060

61-
void PageMenu::setFixed(bool fixed) {
61+
void PageMenu::setFixed(float max) {
62+
auto fields = m_fields.self();
6263
if (AxisLayout* axisLayout = typeinfo_cast<AxisLayout*>(getLayout())) {
63-
axisLayout->setCrossAxisOverflow(!fixed);
64+
axisLayout->setCrossAxisOverflow(false);
65+
}
66+
if (fields->m_orientation == PageOrientation::VERTICAL) {
67+
setContentWidth(max);
68+
}
69+
else {
70+
setContentHeight(max);
6471
}
6572
}
6673

0 commit comments

Comments
 (0)