From 8fb483dd0f2a4809c84e23fc554e36e129a457ee Mon Sep 17 00:00:00 2001 From: Jeremy Potter Date: Thu, 16 Apr 2020 18:15:22 -0700 Subject: [PATCH] Make bold frag messages optional --- _hud_descriptions.cfg | 1 + hud_luma.cfg | 1 + hud_luminos.cfg | 1 + hud_luminos_minimal.cfg | 1 + hud_luminos_minimal_xhair.cfg | 1 + hud_luminos_old.cfg | 1 + hud_nexuiz.cfg | 1 + qcsrc/client/autocvars.qh | 1 + qcsrc/client/hud/hud_config.qc | 1 + qcsrc/client/hud/panel/centerprint.qc | 4 ++-- qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc | 7 +++++++ qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qh | 2 +- 12 files changed, 19 insertions(+), 3 deletions(-) diff --git a/_hud_descriptions.cfg b/_hud_descriptions.cfg index 3f0355b5f..ffaaeeef5 100644 --- a/_hud_descriptions.cfg +++ b/_hud_descriptions.cfg @@ -274,6 +274,7 @@ seta hud_panel_centerprint_bg_border "" "if set to something else than \"\" = ov seta hud_panel_centerprint_bg_padding "" "if set to something else than \"\" = override default padding of contents from border" seta hud_panel_centerprint_align "" "text alignment: 0 left, 0.5 center, 1 right" seta hud_panel_centerprint_flip "" "invert messages order" +seta hud_panel_centerprint_bold "" "make frag messages have a special bold font and an increased font size" seta hud_panel_centerprint_fontscale "" "scale the text font by this amount" seta hud_panel_centerprint_fontscale_bold "" "scale the bold text font by this amount" seta hud_panel_centerprint_time "" "message duration (NOTE: certain messages have a fixed duration)" diff --git a/hud_luma.cfg b/hud_luma.cfg index 7b8361816..26cfcf723 100644 --- a/hud_luma.cfg +++ b/hud_luma.cfg @@ -275,6 +275,7 @@ seta hud_panel_centerprint_bg_border "" seta hud_panel_centerprint_bg_padding "" seta hud_panel_centerprint_align "0.5" seta hud_panel_centerprint_flip "0" +seta hud_panel_centerprint_bold "1" seta hud_panel_centerprint_fontscale "1" seta hud_panel_centerprint_fontscale_bold "1.8" seta hud_panel_centerprint_time "3" diff --git a/hud_luminos.cfg b/hud_luminos.cfg index a7e95f56f..1e1cb6688 100644 --- a/hud_luminos.cfg +++ b/hud_luminos.cfg @@ -275,6 +275,7 @@ seta hud_panel_centerprint_bg_border "" seta hud_panel_centerprint_bg_padding "" seta hud_panel_centerprint_align "0.5" seta hud_panel_centerprint_flip "0" +seta hud_panel_centerprint_bold "1" seta hud_panel_centerprint_fontscale "1" seta hud_panel_centerprint_fontscale_bold "1.8" seta hud_panel_centerprint_time "3" diff --git a/hud_luminos_minimal.cfg b/hud_luminos_minimal.cfg index 646b149d6..50c837b07 100644 --- a/hud_luminos_minimal.cfg +++ b/hud_luminos_minimal.cfg @@ -275,6 +275,7 @@ seta hud_panel_centerprint_bg_border "" seta hud_panel_centerprint_bg_padding "" seta hud_panel_centerprint_align "0.5" seta hud_panel_centerprint_flip "0" +seta hud_panel_centerprint_bold "1" seta hud_panel_centerprint_fontscale "1" seta hud_panel_centerprint_fontscale_bold "1.8" seta hud_panel_centerprint_time "3" diff --git a/hud_luminos_minimal_xhair.cfg b/hud_luminos_minimal_xhair.cfg index f8716369d..2bfc5a80c 100644 --- a/hud_luminos_minimal_xhair.cfg +++ b/hud_luminos_minimal_xhair.cfg @@ -275,6 +275,7 @@ seta hud_panel_centerprint_bg_border "" seta hud_panel_centerprint_bg_padding "" seta hud_panel_centerprint_align "0.5" seta hud_panel_centerprint_flip "0" +seta hud_panel_centerprint_bold "1" seta hud_panel_centerprint_fontscale "1" seta hud_panel_centerprint_fontscale_bold "1.8" seta hud_panel_centerprint_time "3" diff --git a/hud_luminos_old.cfg b/hud_luminos_old.cfg index 16b498a75..e2ed8a4b1 100644 --- a/hud_luminos_old.cfg +++ b/hud_luminos_old.cfg @@ -275,6 +275,7 @@ seta hud_panel_centerprint_bg_border "" seta hud_panel_centerprint_bg_padding "" seta hud_panel_centerprint_align "0.5" seta hud_panel_centerprint_flip "0" +seta hud_panel_centerprint_bold "1" seta hud_panel_centerprint_fontscale "1" seta hud_panel_centerprint_fontscale_bold "1.8" seta hud_panel_centerprint_time "3" diff --git a/hud_nexuiz.cfg b/hud_nexuiz.cfg index 0e0f079e8..eb27a98c1 100644 --- a/hud_nexuiz.cfg +++ b/hud_nexuiz.cfg @@ -275,6 +275,7 @@ seta hud_panel_centerprint_bg_border "" seta hud_panel_centerprint_bg_padding "" seta hud_panel_centerprint_align "0.5" seta hud_panel_centerprint_flip "0" +seta hud_panel_centerprint_bold "1" seta hud_panel_centerprint_fontscale "1" seta hud_panel_centerprint_fontscale_bold "1.8" seta hud_panel_centerprint_time "3" diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index d125ae8a6..7c4802dad 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -242,6 +242,7 @@ float autocvar_hud_panel_centerprint_fade_subsequent_passtwo_minalpha = 0.5; float autocvar_hud_panel_centerprint_fade_subsequent_minfontsize = 0.75; float autocvar_hud_panel_centerprint_fade_minfontsize = 0; bool autocvar_hud_panel_centerprint_flip; +bool autocvar_hud_panel_centerprint_bold; float autocvar_hud_panel_centerprint_fontscale; float autocvar_hud_panel_centerprint_fontscale_bold; float autocvar_hud_panel_centerprint_time; diff --git a/qcsrc/client/hud/hud_config.qc b/qcsrc/client/hud/hud_config.qc index 4b5963cc4..ed4e1b935 100644 --- a/qcsrc/client/hud/hud_config.qc +++ b/qcsrc/client/hud/hud_config.qc @@ -193,6 +193,7 @@ void HUD_Panel_ExportCfg(string cfgname) case HUD_PANEL_CENTERPRINT: HUD_Write_Cvar("hud_panel_centerprint_align"); HUD_Write_Cvar("hud_panel_centerprint_flip"); + HUD_Write_Cvar("hud_panel_centerprint_bold"); HUD_Write_Cvar("hud_panel_centerprint_fontscale"); HUD_Write_Cvar("hud_panel_centerprint_fontscale_bold"); HUD_Write_Cvar("hud_panel_centerprint_time"); diff --git a/qcsrc/client/hud/panel/centerprint.qc b/qcsrc/client/hud/panel/centerprint.qc index 5d47ed85a..de81f6425 100644 --- a/qcsrc/client/hud/panel/centerprint.qc +++ b/qcsrc/client/hud/panel/centerprint.qc @@ -213,8 +213,8 @@ void HUD_CenterPrint () align = bound(0, autocvar_hud_panel_centerprint_align, 1); for (g=0, i=0, j=cpm_index; i