Center icon in cell only if there is no text

This commit is contained in:
Deve
2019-01-11 22:48:57 +01:00
parent e1e0b43f88
commit 43885eacf2

View File

@@ -545,7 +545,7 @@ void CGUISTKListBox::draw()
core::position2di iconPos = textRect.UpperLeftCorner;
iconPos.Y += textRect.getHeight() / 2;
if (Items[i].m_contents[x].m_center)
if (Items[i].m_contents[x].m_center && Items[i].m_contents[x].m_text.size() == 0)
{
iconPos.X += part_size/2 - 3;
}