- fixed menu caption for languages which use the VGA font.

This commit is contained in:
Christoph Oelckers 2019-04-17 23:40:05 +02:00
parent b8ba606b08
commit 2a329950f6

View file

@ -225,9 +225,10 @@ class OptionMenu : Menu
if (y <= 0)
{
if (mDesc.mFont && mDesc.mTitle.Length() > 0)
let font = generic_ui || !mDesc.mFont? NewSmallFont : mDesc.mFont;
if (font && mDesc.mTitle.Length() > 0)
{
y = -y + mDesc.mFont.GetHeight();
y = -y + font.GetHeight();
}
else
{
@ -422,13 +423,14 @@ class OptionMenu : Menu
if (y <= 0)
{
if (mDesc.mFont && mDesc.mTitle.Length() > 0)
let font = generic_ui || !mDesc.mFont? NewSmallFont : mDesc.mFont;
if (font && mDesc.mTitle.Length() > 0)
{
let tt = Stringtable.Localize(mDesc.mTitle);
screen.DrawText (mDesc.mFont, OptionMenuSettings.mTitleColor,
(screen.GetWidth() - mDesc.mFont.StringWidth(tt) * CleanXfac_1) / 2, 10*CleanYfac_1,
screen.DrawText (font, OptionMenuSettings.mTitleColor,
(screen.GetWidth() - font.StringWidth(tt) * CleanXfac_1) / 2, 10*CleanYfac_1,
tt, DTA_CleanNoMove_1, true);
y = -y + mDesc.mFont.GetHeight();
y = -y + font.GetHeight();
}
else
{