Recalculate glyph layouts when list box resized

This commit is contained in:
CodingJellyfish 2024-04-21 14:08:39 +08:00
parent af1238d688
commit 0d2fd6f628

View File

@ -462,6 +462,13 @@ void CGUISTKListBox::selectNew(s32 ypos, bool onlyHover)
void CGUISTKListBox::updateAbsolutePosition()
{
IGUIElement::updateAbsolutePosition();
for (int i = 0; i < Items.size(); i++)
{
for (int j = 0; j < Items[i].m_contents.size(); j++)
{
Items[i].m_contents[j].m_glyph_layouts.clear();
}
}
recalculateItemHeight();
}