From: Jeremy Potter Date: Fri, 17 Apr 2020 01:53:46 +0000 (-0700) Subject: Fix bugs X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8b22647be7c50012d9768479d89d19e17bc1673c;p=xonotic%2Fxonotic-data.pk3dir.git Fix bugs --- diff --git a/_hud_descriptions.cfg b/_hud_descriptions.cfg index ffaaeeef5..7a7b063dc 100644 --- a/_hud_descriptions.cfg +++ b/_hud_descriptions.cfg @@ -274,9 +274,9 @@ 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_bold "" "make frag messages bold" 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_fontscale_bold "" "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/qcsrc/client/hud/panel/centerprint.qc b/qcsrc/client/hud/panel/centerprint.qc index de81f6425..4f99a27a4 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 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) draw_beginBoldFont(); + if (is_bold && autocvar_hud_panel_centerprint_bold) draw_beginBoldFont(); drawcolorcodedstring(pos + eY * 0.5 * (1 - sz * hud_scale.x) * fontsize.y, ts, fontsize, a, DRAWFLAG_NORMAL); - if (is_bold) draw_endBoldFont(); + if (is_bold && autocvar_hud_panel_centerprint_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 4e3ed5420..559f86e85 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc +++ b/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qc @@ -36,11 +36,13 @@ void XonoticHUDCenterprintDialog_fill(entity 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, 2, 0.1, "hud_panel_centerprint_fontscale")); + me.TR(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.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Bold font scale:"))); + 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")); } diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qh b/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qh index 9cc53d310..0d237d67e 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qh +++ b/qcsrc/menu/xonotic/dialog_hudpanel_centerprint.qh @@ -6,7 +6,7 @@ CLASS(XonoticHUDCenterprintDialog, XonoticRootDialog) ATTRIB(XonoticHUDCenterprintDialog, title, string, _("Centerprint Panel")); ATTRIB(XonoticHUDCenterprintDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT); ATTRIB(XonoticHUDCenterprintDialog, intendedWidth, float, 0.4); - ATTRIB(XonoticHUDCenterprintDialog, rows, float, 17.5); + ATTRIB(XonoticHUDCenterprintDialog, rows, float, 19); ATTRIB(XonoticHUDCenterprintDialog, columns, float, 4); ATTRIB(XonoticHUDCenterprintDialog, name, string, "HUDcenterprint"); ATTRIB(XonoticHUDCenterprintDialog, requiresConnection, float, true);