- check for presence of fonts in message box menu

https://forum.zdoom.org/viewtopic.php?t=64958
This commit is contained in:
alexey.lysiuk 2019-06-07 11:49:01 +03:00 committed by Rachael Alexanderson
parent b818beca4b
commit 1b1a85a283

View file

@ -65,8 +65,8 @@ class MessageBoxMenu : Menu
if (!generic_ui) if (!generic_ui)
{ {
if (SmallFont.CanPrint(message) && SmallFont.CanPrint("$TXT_YES") && SmallFont.CanPrint("$TXT_NO")) textFont = SmallFont; if (SmallFont && SmallFont.CanPrint(message) && SmallFont.CanPrint("$TXT_YES") && SmallFont.CanPrint("$TXT_NO")) textFont = SmallFont;
else if (OriginalSmallFont.CanPrint(message) && OriginalSmallFont.CanPrint("$TXT_YES") && OriginalSmallFont.CanPrint("$TXT_NO")) textFont = OriginalSmallFont; else if (OriginalSmallFont && OriginalSmallFont.CanPrint(message) && OriginalSmallFont.CanPrint("$TXT_YES") && OriginalSmallFont.CanPrint("$TXT_NO")) textFont = OriginalSmallFont;
} }
if (!textFont) if (!textFont)