Implement smooth scrolling in Creative Mode menu (#240)

This commit is contained in:
void_17
2026-03-03 12:21:41 +07:00
committed by GitHub
parent af5d62a81e
commit 3093ca37d3

View File

@@ -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()