mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- added an option to always display the log and the subtitles with the generic font.
If this is on it will disable the status bar's pop screen for the log and always use the HUD overlay instead.
This commit is contained in:
parent
045025f4cf
commit
154af34cd9
5 changed files with 6 additions and 13 deletions
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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__
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 ()
|
||||
|
|
Loading…
Reference in a new issue