From: Jeremy Potter Date: Fri, 17 Apr 2020 21:35:59 +0000 (-0700) Subject: Make autocvar names more clear X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bfcb1087cc6691377439c6397a7d4be6e0c78393;p=xonotic%2Fxonotic-data.pk3dir.git Make autocvar names more clear --- diff --git a/_hud_descriptions.cfg b/_hud_descriptions.cfg index 143647022..24cdf463e 100644 --- a/_hud_descriptions.cfg +++ b/_hud_descriptions.cfg @@ -274,10 +274,10 @@ 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 bold" -seta hud_panel_centerprint_capitalize "" "make frag messages uppercase" +seta hud_panel_centerprint_fragmessage_bold "" "make frag messages bold" +seta hud_panel_centerprint_fragmessage_capitalize "" "make frag messages uppercase" seta hud_panel_centerprint_fontscale "" "scale the text font by this amount" -seta hud_panel_centerprint_fontscale_bold "" "scale the text font of frag messages by this amount" +seta hud_panel_centerprint_fragmessage_fontscale "" "scale the text font of frag messages by this amount" seta hud_panel_centerprint_time "" "message duration (NOTE: certain messages have a fixed duration)" seta hud_panel_centerprint_fade_in "" "how long a message takes to fade in" seta hud_panel_centerprint_fade_out "" "how long a message takes to fade out (this time is included in the message duration and can't be > 5)" diff --git a/hud_luma.cfg b/hud_luma.cfg index b76c7b2f6..ab5c27d18 100644 --- a/hud_luma.cfg +++ b/hud_luma.cfg @@ -275,10 +275,10 @@ 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_capitalize "1" +seta hud_panel_centerprint_fragmessage_bold "1" +seta hud_panel_centerprint_fragmessage_capitalize "1" seta hud_panel_centerprint_fontscale "1" -seta hud_panel_centerprint_fontscale_bold "1.8" +seta hud_panel_centerprint_fragmessage_fontscale "1.8" seta hud_panel_centerprint_time "3" seta hud_panel_centerprint_fade_in "0.2" seta hud_panel_centerprint_fade_out "0.5" diff --git a/hud_luminos.cfg b/hud_luminos.cfg index 6a966debb..eb8fc49e0 100644 --- a/hud_luminos.cfg +++ b/hud_luminos.cfg @@ -275,10 +275,10 @@ 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_capitalize "1" +seta hud_panel_centerprint_fragmessage_bold "1" +seta hud_panel_centerprint_fragmessage_capitalize "1" seta hud_panel_centerprint_fontscale "1" -seta hud_panel_centerprint_fontscale_bold "1.8" +seta hud_panel_centerprint_fragmessage_fontscale "1.8" seta hud_panel_centerprint_time "3" seta hud_panel_centerprint_fade_in "0.2" seta hud_panel_centerprint_fade_out "0.5" diff --git a/hud_luminos_minimal.cfg b/hud_luminos_minimal.cfg index c67769e0b..e16b571c7 100644 --- a/hud_luminos_minimal.cfg +++ b/hud_luminos_minimal.cfg @@ -275,10 +275,10 @@ 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_capitalize "1" +seta hud_panel_centerprint_fragmessage_bold "1" +seta hud_panel_centerprint_fragmessage_capitalize "1" seta hud_panel_centerprint_fontscale "1" -seta hud_panel_centerprint_fontscale_bold "1.8" +seta hud_panel_centerprint_fragmessage_fontscale "1.8" seta hud_panel_centerprint_time "3" seta hud_panel_centerprint_fade_in "0.2" seta hud_panel_centerprint_fade_out "0.5" diff --git a/hud_luminos_minimal_xhair.cfg b/hud_luminos_minimal_xhair.cfg index a079da52b..5a4cc2b39 100644 --- a/hud_luminos_minimal_xhair.cfg +++ b/hud_luminos_minimal_xhair.cfg @@ -275,11 +275,11 @@ 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_capitalize "1" -seta hud_panel_centerprint_capitalize "1" +seta hud_panel_centerprint_fragmessage_bold "1" +seta hud_panel_centerprint_fragmessage_capitalize "1" +seta hud_panel_centerprint_fragmessage_capitalize "1" seta hud_panel_centerprint_fontscale "1" -seta hud_panel_centerprint_fontscale_bold "1.8" +seta hud_panel_centerprint_fragmessage_fontscale "1.8" seta hud_panel_centerprint_time "3" seta hud_panel_centerprint_fade_in "0.2" seta hud_panel_centerprint_fade_out "0.5" diff --git a/hud_luminos_old.cfg b/hud_luminos_old.cfg index 8c09dc3e7..8b85e1107 100644 --- a/hud_luminos_old.cfg +++ b/hud_luminos_old.cfg @@ -275,10 +275,10 @@ 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_capitalize "1" +seta hud_panel_centerprint_fragmessage_bold "1" +seta hud_panel_centerprint_fragmessage_capitalize "1" seta hud_panel_centerprint_fontscale "1" -seta hud_panel_centerprint_fontscale_bold "1.8" +seta hud_panel_centerprint_fragmessage_fontscale "1.8" seta hud_panel_centerprint_time "3" seta hud_panel_centerprint_fade_in "0.2" seta hud_panel_centerprint_fade_out "0.5" diff --git a/hud_nexuiz.cfg b/hud_nexuiz.cfg index 08df3444b..8026d65af 100644 --- a/hud_nexuiz.cfg +++ b/hud_nexuiz.cfg @@ -275,10 +275,10 @@ 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_capitalize "1" +seta hud_panel_centerprint_fragmessage_bold "1" +seta hud_panel_centerprint_fragmessage_capitalize "1" seta hud_panel_centerprint_fontscale "1" -seta hud_panel_centerprint_fontscale_bold "1.8" +seta hud_panel_centerprint_fragmessage_fontscale "1.8" seta hud_panel_centerprint_time "3" seta hud_panel_centerprint_fade_in "0.2" seta hud_panel_centerprint_fade_out "0.5" diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index 29755bce5..992ba487b 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -242,10 +242,10 @@ 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; -bool autocvar_hud_panel_centerprint_capitalize; +bool autocvar_hud_panel_centerprint_fragmessage_bold; +bool autocvar_hud_panel_centerprint_fragmessage_capitalize; float autocvar_hud_panel_centerprint_fontscale; -float autocvar_hud_panel_centerprint_fontscale_bold; +float autocvar_hud_panel_centerprint_fragmessage_fontscale; float autocvar_hud_panel_centerprint_time; bool autocvar_hud_panel_chat; bool autocvar_hud_panel_engineinfo; diff --git a/qcsrc/client/hud/hud_config.qc b/qcsrc/client/hud/hud_config.qc index 4428c4602..6581b807c 100644 --- a/qcsrc/client/hud/hud_config.qc +++ b/qcsrc/client/hud/hud_config.qc @@ -193,10 +193,10 @@ 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_capitalize"); + HUD_Write_Cvar("hud_panel_centerprint_fragmessage_bold"); + HUD_Write_Cvar("hud_panel_centerprint_fragmessage_capitalize"); HUD_Write_Cvar("hud_panel_centerprint_fontscale"); - HUD_Write_Cvar("hud_panel_centerprint_fontscale_bold"); + HUD_Write_Cvar("hud_panel_centerprint_fragmessage_fontscale"); HUD_Write_Cvar("hud_panel_centerprint_time"); HUD_Write_Cvar("hud_panel_centerprint_fade_in"); HUD_Write_Cvar("hud_panel_centerprint_fade_out"); diff --git a/qcsrc/client/hud/panel/centerprint.qc b/qcsrc/client/hud/panel/centerprint.qc index 1627b227b..91eaaf1f5 100644 --- a/qcsrc/client/hud/panel/centerprint.qc +++ b/qcsrc/client/hud/panel/centerprint.qc @@ -215,9 +215,9 @@ void HUD_CenterPrint () { // if the notification starts with ^BOLD make it bold (e.g. frag messages) is_bold = (substring(centerprint_messages[j], 0, 5) == BOLD_OPERATOR); - // remove ^BOLD so it doesn't get printed onscreen. also capitalize the text if hud_panel_centerprint_capitalize is true + // remove ^BOLD so it doesn't get printed onscreen. also capitalize the text if hud_panel_centerprint_fragmessage_capitalize is true if (is_bold) { - if (autocvar_hud_panel_centerprint_capitalize) { + if (autocvar_hud_panel_centerprint_fragmessage_capitalize) { centerprint_message = strzone(strtoupper(substring(centerprint_messages[j], 5, -1))); } else { centerprint_message = strzone(substring(centerprint_messages[j], 5, -1)); @@ -229,7 +229,7 @@ void HUD_CenterPrint () // entries = bound(1, floor(CENTERPRINT_MAX_ENTRIES * 4 * panel_size_y/panel_size_x), CENTERPRINT_MAX_ENTRIES); // height = panel_size_y/entries; // fontsize = '1 1 0' * height; - height = (is_bold) ? vid_conheight/50 * autocvar_hud_panel_centerprint_fontscale_bold : vid_conheight/50 * autocvar_hud_panel_centerprint_fontscale; + height = (is_bold) ? vid_conheight/50 * autocvar_hud_panel_centerprint_fragmessage_fontscale : vid_conheight/50 * autocvar_hud_panel_centerprint_fontscale; fontsize = '1 1 0' * height; entries = bound(1, floor(panel_size.y/height), CENTERPRINT_MAX_ENTRIES); @@ -326,9 +326,9 @@ void HUD_CenterPrint () if (align) pos.x = panel_pos.x + (panel_size.x - stringwidth(ts, true, fontsize) * sz) * align; if (a > 0.5/255.0) // Otherwise guaranteed invisible - don't show. This is checked a second time after some multiplications with other factors were done so temporary changes of these cannot cause flicker. - if (is_bold && autocvar_hud_panel_centerprint_bold) draw_beginBoldFont(); + if (is_bold && autocvar_hud_panel_centerprint_fragmessage_bold) draw_beginBoldFont(); drawcolorcodedstring(pos + eY * 0.5 * (1 - sz * hud_scale.x) * fontsize.y, ts, fontsize, a, DRAWFLAG_NORMAL); - if (is_bold && autocvar_hud_panel_centerprint_bold) draw_endBoldFont(); + if (is_bold && autocvar_hud_panel_centerprint_fragmessage_bold) draw_endBoldFont(); pos.y += fontsize.y; } else diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc b/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc index d392bbb0c..81210ca7b 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc @@ -40,12 +40,12 @@ void XonoticHUDCenterprintDialog_fill(entity me) me.TD(me, 1, 4, e = makeXonoticTextLabel(0, _("Frag messages:"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_centerprint_bold", _("Enable bold frag messages"))); + me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_centerprint_fragmessage_bold", _("Enable bold frag messages"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_centerprint_capitalize", _("Capitalize frag messages"))); + me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_centerprint_fragmessage_capitalize", _("Capitalize frag messages"))); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Font scale:"))); - me.TD(me, 1, 2.6, e = makeXonoticSlider(0.5, 3, 0.2, "hud_panel_centerprint_fontscale_bold")); + me.TD(me, 1, 2.6, e = makeXonoticSlider(0.5, 3, 0.2, "hud_panel_centerprint_fragmessage_fontscale")); }