- 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.
This commit is contained in:
Christoph Oelckers 2019-03-18 10:54:26 +01:00
parent 86f9824c2a
commit 8f93dcc884

View file

@ -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;