Implement smooth scrolling in Creative Mode menu (#240)

This commit is contained in:
void_17 authored and GitHub committed 2026-03-03 13:21:41 +08:00
1 parent af5d62a81e
commit 3093ca37d3
1 file changed
+3 -2
@@ -845,8 +845,9 @@ IUIScene_CreativeMenu::TabSpec::TabSpec(LPCWSTR icon, int descriptionId, int sta
} }
} }
m_staticPerPage = MAX_SIZE - dynamicItems; m_staticPerPage = columns;
m_pages = (int)ceil((float)m_staticItems / m_staticPerPage); const int totalRows = (m_staticItems + columns - 1) / columns;
m_pages = std::max<int>(1, totalRows - 5 + 1);
} }
IUIScene_CreativeMenu::TabSpec::~TabSpec() IUIScene_CreativeMenu::TabSpec::~TabSpec()