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

Commit f8b2e3b

Browse files
committed
Fixed
1 parent bb1efc1 commit f8b2e3b

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

include/PageMenu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +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);
4445

4546
private:
4647
void nextPage(cocos2d::CCObject* obj);

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"android": "2.2074",
66
"mac": "2.2074"
77
},
8-
"version": "v1.4.7",
8+
"version": "v1.4.8",
99
"id": "alphalaneous.pages_api",
1010
"name": "Pages API",
1111
"developer": "Alphalaneous",

src/PageMenu.cpp

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

61+
void PageMenu::setFixed(bool fixed) {
62+
if (AxisLayout* axisLayout = typeinfo_cast<AxisLayout*>(getLayout())) {
63+
axisLayout->setCrossAxisOverflow(!fixed);
64+
}
65+
}
66+
6167
void PageMenu::setButtonScale(float scale) {
6268
auto fields = m_fields.self();
6369

@@ -128,9 +134,6 @@ void PageMenu::setPaged(int count, PageOrientation orientation, float max, float
128134

129135
setPage(fields->m_currentPage);
130136
if (Layout* layout = getLayout()) {
131-
if (AxisLayout* axisLayout = typeinfo_cast<AxisLayout*>(layout)) {
132-
axisLayout->setCrossAxisOverflow(false);
133-
}
134137
layout->ignoreInvisibleChildren(true);
135138
}
136139
updateLayout();

0 commit comments

Comments
 (0)