Skip to content

Commit

Permalink
Fixed missing lines in listmenuitems
Browse files Browse the repository at this point in the history
  • Loading branch information
jekyllgrim authored and madame-rachelle committed Jan 30, 2024
1 parent 3e7d304 commit 9712409
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions wadsrc/static/zscript/engine/ui/menu/listmenuitems.zs
Expand Up @@ -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()
Expand Down

0 comments on commit 9712409

Please sign in to comment.