diff --git a/src/console/c_console.cpp b/src/console/c_console.cpp index 7b9a0ae583..199c5a7529 100644 --- a/src/console/c_console.cpp +++ b/src/console/c_console.cpp @@ -581,11 +581,6 @@ CUSTOM_CVAR (Int, msgmidcolor2, 4, CVAR_ARCHIVE) setmsgcolor (PRINTLEVELS+1, self); } -FFont * C_GetDefaultHUDFont() -{ - return generic_ui? NewSmallFont : SmallFont; -} - void C_InitConback() { conback = TexMan.CheckForTexture ("CONBACK", ETextureType::MiscPatch); diff --git a/src/g_statusbar/shared_sbar.cpp b/src/g_statusbar/shared_sbar.cpp index 293edf355c..aec788b564 100644 --- a/src/g_statusbar/shared_sbar.cpp +++ b/src/g_statusbar/shared_sbar.cpp @@ -86,7 +86,7 @@ EXTERN_CVAR (Int, con_scaletext) EXTERN_CVAR(Bool, vid_fps) EXTERN_CVAR(Bool, inter_subtitles) CVAR(Int, hud_scale, 0, CVAR_ARCHIVE); - +CVAR(Bool, log_vgafont, false, CVAR_ARCHIVE) DBaseStatusBar *StatusBar; @@ -1231,10 +1231,10 @@ void DBaseStatusBar::DrawLog () if (text.IsNotEmpty()) { // This uses the same scaling as regular HUD messages - auto scale = active_con_scaletext(generic_ui); + auto scale = active_con_scaletext(generic_ui || log_vgafont); hudwidth = SCREENWIDTH / scale; hudheight = SCREENHEIGHT / scale; - FFont *font = C_GetDefaultHUDFont(); + FFont *font = (generic_ui || log_vgafont)? NewSmallFont : SmallFont; int linelen = hudwidth<640? Scale(hudwidth,9,10)-40 : 560; auto lines = V_BreakLines (font, linelen, text[0] == '$'? GStrings(text.GetChars()+1) : text.GetChars()); diff --git a/src/gamedata/fonts/v_font.h b/src/gamedata/fonts/v_font.h index 2c9d1aeb6d..9604760547 100644 --- a/src/gamedata/fonts/v_font.h +++ b/src/gamedata/fonts/v_font.h @@ -191,7 +191,5 @@ EColorRange V_ParseFontColor (const uint8_t *&color_value, int normalcolor, int FFont *V_GetFont(const char *fontname, const char *fontlumpname = nullptr); void V_InitFontColors(); -FFont * C_GetDefaultHUDFont(); - #endif //__V_FONT_H__ diff --git a/src/intermission/intermission.cpp b/src/intermission/intermission.cpp index 2d39b24adf..22226b5630 100644 --- a/src/intermission/intermission.cpp +++ b/src/intermission/intermission.cpp @@ -84,7 +84,7 @@ void DrawFullscreenSubtitle(const char *text) auto scale = active_con_scaletext(generic_ui); int hudwidth = SCREENWIDTH / scale; int hudheight = SCREENHEIGHT / scale; - FFont *font = C_GetDefaultHUDFont(); + FFont *font = generic_ui? NewSmallFont : SmallFont; int linelen = hudwidth < 640 ? Scale(hudwidth, 9, 10) - 40 : 560; auto lines = V_BreakLines(font, linelen, text); diff --git a/wadsrc/static/zscript/ui/statusbar/strife_sbar.zs b/wadsrc/static/zscript/ui/statusbar/strife_sbar.zs index 5adf3ee6e2..3a7c3e0722 100644 --- a/wadsrc/static/zscript/ui/statusbar/strife_sbar.zs +++ b/wadsrc/static/zscript/ui/statusbar/strife_sbar.zs @@ -109,7 +109,7 @@ class StrifeStatusBar : BaseStatusBar override void ShowPop (int popnum) { Super.ShowPop(popnum); - if (popnum == CurrentPop || (popnum == POP_LOG && generic_ui)) + if (popnum == CurrentPop || (popnum == POP_LOG && MustDrawLog(0))) { if (popnum == POP_Keys) { @@ -146,7 +146,7 @@ class StrifeStatusBar : BaseStatusBar override bool MustDrawLog(int state) { // Tell the base class to draw the log if the pop screen won't be displayed. - return generic_ui; + return generic_ui || log_vgafont; } void Reset ()