From 0f7e7744b034b44f2bfa158c9acc78099558c69f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Lu=C3=ADs=20Vaz=20Silva?= Date: Thu, 17 Nov 2022 19:46:22 -0300 Subject: [PATCH] CustomMessageBox Formatting --- wadsrc/static/zscript/engine/ui/menu/custommessagebox.zs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wadsrc/static/zscript/engine/ui/menu/custommessagebox.zs b/wadsrc/static/zscript/engine/ui/menu/custommessagebox.zs index 312f7a30b8..56fcef7b55 100644 --- a/wadsrc/static/zscript/engine/ui/menu/custommessagebox.zs +++ b/wadsrc/static/zscript/engine/ui/menu/custommessagebox.zs @@ -124,7 +124,8 @@ class CustomMessageBoxMenuBase : Menu abstract mMouseY = int(y); let n = optionCount(); - for(uint i = 0; i < n; i++){ + for(uint i = 0; i < n; i++) + { screen.DrawText(textFont, messageSelection == i? OptionMenuSettings.mFontColorSelection : OptionMenuSettings.mFontColor, (destWidth / 2) + OptionXOffset(i), y + (fontheight * i), Stringtable.Localize(optionName(i)), DTA_VirtualWidth, destWidth, DTA_VirtualHeight, destHeight, DTA_KeepRatio, true, DTA_ScaleX, NotifyFontScale, DTA_ScaleY, NotifyFontScale); } @@ -209,7 +210,7 @@ class CustomMessageBoxMenuBase : Menu abstract if (mkey == MKEY_Up) { MenuSound("menu/cursor"); - if(messageSelection == 0) messageSelection = optionCount(); + if (messageSelection == 0) messageSelection = optionCount(); messageSelection--; return true; } @@ -217,7 +218,7 @@ class CustomMessageBoxMenuBase : Menu abstract { MenuSound("menu/cursor"); messageSelection++; - if(messageSelection == optionCount()) messageSelection = 0; + if (messageSelection == optionCount()) messageSelection = 0; return true; } else if (mkey == MKEY_Enter)