]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Adjust font weight for some of the HUD text
authorSeverin Meyer <sev.ch@web.de>
Fri, 10 Jul 2015 10:23:53 +0000 (12:23 +0200)
committerSeverin Meyer <sev.ch@web.de>
Fri, 10 Jul 2015 10:23:53 +0000 (12:23 +0200)
qcsrc/client/hud.qc
qcsrc/client/scoreboard.qc

index b61fe2a5da685f95d66b3a766fdaded8d63cf2ca..45f2391a48d70186dc77ac483d2e25e35e2c21ed 100644 (file)
@@ -521,8 +521,6 @@ void HUD_Weapons(void)
        // update generic hud functions
        HUD_Panel_UpdateCvars();
 
        // update generic hud functions
        HUD_Panel_UpdateCvars();
 
-       draw_beginBoldFont();
-
        // figure out weapon order (how the weapons are sorted) // TODO make this configurable
        if(weaponorder_bypriority != autocvar_cl_weaponpriority || !weaponorder[0])
        {
        // figure out weapon order (how the weapons are sorted) // TODO make this configurable
        if(weaponorder_bypriority != autocvar_cl_weaponpriority || !weaponorder[0])
        {
@@ -592,10 +590,7 @@ void HUD_Weapons(void)
 
                // might as well commit suicide now, no reason to live ;)
                if (weapon_count == 0)
 
                // might as well commit suicide now, no reason to live ;)
                if (weapon_count == 0)
-               {
-                       draw_endBoldFont();
                        return;
                        return;
-               }
 
                vector old_panel_size = panel_size;
                vector padded_panel_size = panel_size - '2 2 0' * panel_bg_padding;
 
                vector old_panel_size = panel_size;
                vector padded_panel_size = panel_size - '2 2 0' * panel_bg_padding;
@@ -749,10 +744,7 @@ void HUD_Weapons(void)
        HUD_Panel_DrawBg(1);
 
        if(center.x == -1)
        HUD_Panel_DrawBg(1);
 
        if(center.x == -1)
-       {
-               draw_endBoldFont();
                return;
                return;
-       }
 
        if(panel_bg_padding)
        {
 
        if(panel_bg_padding)
        {
@@ -955,8 +947,6 @@ void HUD_Weapons(void)
                        }
                }
        }
                        }
                }
        }
-
-       draw_endBoldFont();
 }
 
 // Ammo (#1)
 }
 
 // Ammo (#1)
@@ -1551,6 +1541,9 @@ void HUD_HealthArmor(void)
        }
 
        HUD_Panel_UpdateCvars();
        }
 
        HUD_Panel_UpdateCvars();
+
+       draw_beginBoldFont();
+
        vector pos, mySize;
        pos = panel_pos;
        mySize = panel_size;
        vector pos, mySize;
        pos = panel_pos;
        mySize = panel_size;
@@ -1756,6 +1749,8 @@ void HUD_HealthArmor(void)
                        HUD_Panel_DrawProgressBar(pos, mySize, "progressbar", fuel/100, is_vertical, fuel_baralign, autocvar_hud_progressbar_fuel_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
                }
        }
                        HUD_Panel_DrawProgressBar(pos, mySize, "progressbar", fuel/100, is_vertical, fuel_baralign, autocvar_hud_progressbar_fuel_color, panel_fg_alpha * 0.8, DRAWFLAG_NORMAL);
                }
        }
+
+       draw_endBoldFont();
 }
 
 // Notification area (#4)
 }
 
 // Notification area (#4)
@@ -2490,8 +2485,6 @@ void HUD_RaceTimer (void)
 
        HUD_Panel_UpdateCvars();
 
 
        HUD_Panel_UpdateCvars();
 
-       draw_beginBoldFont();
-
        vector pos, mySize;
        pos = panel_pos;
        mySize = panel_size;
        vector pos, mySize;
        pos = panel_pos;
        mySize = panel_size;
@@ -2527,7 +2520,9 @@ void HUD_RaceTimer (void)
        if(autocvar__hud_configure)
        {
                s = "0:13:37";
        if(autocvar__hud_configure)
        {
                s = "0:13:37";
+               draw_beginBoldFont();
                drawstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, false, '0.60 0.60 0' * mySize.y), s, '0.60 0.60 0' * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                drawstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, false, '0.60 0.60 0' * mySize.y), s, '0.60 0.60 0' * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               draw_endBoldFont();
                s = _("^1Intermediate 1 (+15.42)");
                drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, true, '1 1 0' * 0.20 * mySize.y) + eY * 0.60 * mySize.y, s, '1 1 0' * 0.20 * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL);
                s = sprintf(_("^1PENALTY: %.1f (%s)"), 2, "missing a checkpoint");
                s = _("^1Intermediate 1 (+15.42)");
                drawcolorcodedstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, true, '1 1 0' * 0.20 * mySize.y) + eY * 0.60 * mySize.y, s, '1 1 0' * 0.20 * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL);
                s = sprintf(_("^1PENALTY: %.1f (%s)"), 2, "missing a checkpoint");
@@ -2577,6 +2572,8 @@ void HUD_RaceTimer (void)
                        }
                }
 
                        }
                }
 
+               draw_beginBoldFont();
+
                if(forcetime != "")
                {
                        a = bound(0, (time - race_checkpointtime) / 0.5, 1);
                if(forcetime != "")
                {
                        a = bound(0, (time - race_checkpointtime) / 0.5, 1);
@@ -2590,6 +2587,8 @@ void HUD_RaceTimer (void)
                        s = TIME_ENCODED_TOSTRING(TIME_ENCODE(time + TIME_DECODE(race_penaltyaccumulator) - race_laptime));
                        drawstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, false, '0.6 0.6 0' * mySize.y), s, '0.6 0.6 0' * mySize.y, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
                }
                        s = TIME_ENCODED_TOSTRING(TIME_ENCODE(time + TIME_DECODE(race_penaltyaccumulator) - race_laptime));
                        drawstring(pos + eX * 0.5 * mySize.x - '0.5 0 0' * stringwidth(s, false, '0.6 0.6 0' * mySize.y), s, '0.6 0.6 0' * mySize.y, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
                }
+
+               draw_endBoldFont();
        }
        else
        {
        }
        else
        {
@@ -2620,8 +2619,6 @@ void HUD_RaceTimer (void)
                        }
                }
        }
                        }
                }
        }
-
-       draw_endBoldFont();
 }
 
 // Vote window (#9)
 }
 
 // Vote window (#9)
index 905c66c3cc13895b3500915a8631560e747ff4aa..418e1db08b2697239e7d81194fe91e82279d8ff6 100644 (file)
@@ -360,7 +360,6 @@ void Cmd_HUD_SetFields(float argc)
 
        hud_fontsize = HUD_GetFontsize("hud_fontsize");
 
 
        hud_fontsize = HUD_GetFontsize("hud_fontsize");
 
-       draw_beginBoldFont();
        for(i = 1; i < argc - 1; ++i)
        {
                float nocomplain;
        for(i = 1; i < argc - 1; ++i)
        {
                float nocomplain;
@@ -499,7 +498,6 @@ void Cmd_HUD_SetFields(float argc)
        }
 
        hud_field[hud_num_fields] = SP_END;
        }
 
        hud_field[hud_num_fields] = SP_END;
-       draw_endBoldFont();
 }
 
 // MOVEUP::
 }
 
 // MOVEUP::
@@ -879,7 +877,6 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
        }
 
        // print the strings of the columns headers and draw the columns
        }
 
        // print the strings of the columns headers and draw the columns
-       draw_beginBoldFont();
        int i;
        for(i = 0; i < hud_num_fields; ++i)
        {
        int i;
        for(i = 0; i < hud_num_fields; ++i)
        {
@@ -923,7 +920,6 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
                        pos.x -= hud_fontsize.x;
                }
        }
                        pos.x -= hud_fontsize.x;
                }
        }
-       draw_endBoldFont();
 
        pos.x = xmin;
        pos.y += 1.25 * hud_fontsize.y; // skip the header
 
        pos.x = xmin;
        pos.y += 1.25 * hud_fontsize.y; // skip the header