From e0d57e5464d6f36c97c39485cd78aed32928338f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 23 Apr 2019 08:46:35 +0200 Subject: [PATCH] - added smarter font replacement logic to the confirmation screen. --- wadsrc/static/zscript/ui/menu/messagebox.zs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wadsrc/static/zscript/ui/menu/messagebox.zs b/wadsrc/static/zscript/ui/menu/messagebox.zs index 1ed970f35..ed7f27172 100644 --- a/wadsrc/static/zscript/ui/menu/messagebox.zs +++ b/wadsrc/static/zscript/ui/menu/messagebox.zs @@ -61,8 +61,15 @@ class MessageBoxMenu : Menu messageSelection = 0; mMouseLeft = 140; mMouseY = 0x80000000; + textFont = null; + + if (!generic_ui) + { + if (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; + } - if (generic_ui) + if (!textFont) { arrowFont = textFont = NewSmallFont; int factor = (CleanXfac+1) / 2; @@ -72,7 +79,6 @@ class MessageBoxMenu : Menu } else { - textFont = AlternativeSmallFont; arrowFont = ConFont; destWidth = CleanWidth; destHeight = CleanHeight;