Fixed missing lines in listmenuitems

This commit is contained in:
jekyllgrim 2024-01-30 22:32:44 +03:00 committed by Rachael Alexanderson
parent 3e7d304de0
commit 9712409f08

View file

@ -294,8 +294,12 @@ class ListMenuItemTextItem : ListMenuItemSelectable
override void Draw(bool selected, ListMenuDescriptor desc)
{
let font = menuDelegate.PickFont(mFont);
if (desc.mCenterText) x -= font.StringWidth(mText) / 2;
DrawText(desc, font, selected ? mColorSelected : mColor, mXpos, mYpos, mText);
double x = mXpos;
if (desc.mCenterText)
{
x -= font.StringWidth(mText) / 2;
}
DrawText(desc, font, selected ? mColorSelected : mColor, x, mYpos, mText);
}
override int GetWidth()