From 9712409f08b64fb5cef6d369de4de6ff80bad7fc Mon Sep 17 00:00:00 2001 From: jekyllgrim Date: Tue, 30 Jan 2024 22:32:44 +0300 Subject: [PATCH] Fixed missing lines in listmenuitems --- wadsrc/static/zscript/engine/ui/menu/listmenuitems.zs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wadsrc/static/zscript/engine/ui/menu/listmenuitems.zs b/wadsrc/static/zscript/engine/ui/menu/listmenuitems.zs index 7e8166fc72..66a4d9338c 100644 --- a/wadsrc/static/zscript/engine/ui/menu/listmenuitems.zs +++ b/wadsrc/static/zscript/engine/ui/menu/listmenuitems.zs @@ -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()