From 8f93dcc884ac1c8a0e0081871296c5ac92387039 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 18 Mar 2019 10:54:26 +0100 Subject: [PATCH] - fixed the option menu indentation. This was yet another piece of code that essentially was unworkable thanks to the limited screen space with the old bitmap fonts. With the new font there is enough screen space to do this properly. --- wadsrc/static/zscript/ui/menu/optionmenu.zs | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/wadsrc/static/zscript/ui/menu/optionmenu.zs b/wadsrc/static/zscript/ui/menu/optionmenu.zs index c3b7dab52..ea4a7f07a 100644 --- a/wadsrc/static/zscript/ui/menu/optionmenu.zs +++ b/wadsrc/static/zscript/ui/menu/optionmenu.zs @@ -433,22 +433,8 @@ class OptionMenu : Menu int fontheight = OptionMenuSettings.mLinespacing * CleanYfac_1; y *= CleanYfac_1; - int indent = mDesc.mIndent; - if (indent > 280) - { // kludge for the compatibility options with their extremely long labels - if (indent + 40 <= CleanWidth_1) - { - indent = (screen.GetWidth() - ((indent + 40) * CleanXfac_1)) / 2 + indent * CleanXfac_1; - } - else - { - indent = screen.GetWidth() - 40 * CleanXfac_1; - } - } - else - { - indent = (indent - 160) * CleanXfac_1 + screen.GetWidth() / 2; - } + int indent = max(0, (mDesc.mIndent + 40) - CleanWidth_1 / 2); + indent = screen.GetWidth() / 2 + indent * CleanXfac_1; int ytop = y + mDesc.mScrollTop * 8 * CleanYfac_1; int lastrow = screen.GetHeight() - OptionHeight() * CleanYfac_1;