]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Re-position half of the HUD items properly with the new fonts. The other half to...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 14 Apr 2011 16:59:12 +0000 (19:59 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 14 Apr 2011 16:59:12 +0000 (19:59 +0300)
data/qcsrc/client/sbar.qc

index b5360a3510bc74a12854b4828f3edf6a150127a3..2e0d9b15f6fe4311b5676be685da05d921ba14c8 100644 (file)
@@ -139,14 +139,14 @@ void Sbar_DrawXNum (vector pos, float num, float digits, float showminusplus, fl
        if(minus)\r
        {\r
                if (stroke == 1)\r
-                       drawpic(pos, "gfx/hud/num_minus_stroke", vsize, rgb, alpha, dflags);\r
-               drawpic(pos, "gfx/hud/num_minus", vsize, num_color, alpha, dflags);\r
+                       drawstring(pos, "-", vsize, rgb, alpha, dflags);\r
+               drawstring(pos, "-", vsize, num_color, alpha, dflags);\r
                pos_x += lettersize;\r
        } else if(plus)\r
        {\r
                if (stroke == 1)\r
-                       drawpic(pos, "gfx/hud/num_plus_stroke", vsize, rgb, alpha, dflags);\r
-               drawpic(pos, "gfx/hud/num_plus", vsize, num_color, alpha, dflags);\r
+                       drawstring(pos, "+", vsize, rgb, alpha, dflags);\r
+               drawstring(pos, "+", vsize, num_color, alpha, dflags);\r
                pos_x += lettersize;\r
        }\r
 \r
@@ -1693,8 +1693,8 @@ void Sbar_Score()
        if(gametype == GAME_RPG)\r
                return;\r
 \r
-       score_pos = top + '-240 8 0';\r
-       secondary_score_pos = score_pos + '210 -6 0';\r
+       score_pos = top + '-80 8 0';\r
+       secondary_score_pos = score_pos + '80 -6 0';\r
 \r
        if((scores_flags[ps_primary] & SFL_TIME) && !teamplay) { // race/cts record display on HUD\r
                pl = players.sort_next;\r
@@ -1734,20 +1734,20 @@ void Sbar_Score()
                                distribution_color = '1 0 0';\r
                                minusplus = 2; // minusplus 1: always prefix with plus sign\r
                        }\r
-                       Sbar_DrawXNum(score_pos + '335 16 0' - '16 0 0' * TIME_DECIMALS, distmsec, -TIME_DECIMALS, 0, 16, distribution_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-                       Sbar_DrawXNum(score_pos + '403 16 0' - '16 0 0' * TIME_DECIMALS, distsec, 4, minusplus, 16, distribution_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-                       drawpic(score_pos + '335 16 0' - '16 0 0' * TIME_DECIMALS, "gfx/hud/num_dot", '16 16 0', distribution_color, sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
+                       Sbar_DrawXNum(score_pos + '232 -4 0' - '16 0 0' * TIME_DECIMALS, distmsec, -TIME_DECIMALS, 0, 16, distribution_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                       Sbar_DrawXNum(score_pos + '232 12 0' - '16 0 0' * TIME_DECIMALS, distsec, 4, minusplus, 16, distribution_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                       drawstring(score_pos + '216 -4 0' - '16 0 0' * TIME_DECIMALS, ".", '16 16 0', distribution_color, sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
                }\r
                // race record display\r
                if (distribution <= 0 || distribution == score) // draw the highlight background behind the timer if we have the lead\r
-                       drawpic(score_pos + '335 0 0' - '32 0 0' * (4 + TIME_DECIMALS), "gfx/hud/sb_highlight_4", '0 28 0' + '32 0 0' * (4 + TIME_DECIMALS), '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                       drawpic(score_pos + '173 0 0' - '32 0 0' * (4 + TIME_DECIMALS), "gfx/hud/sb_highlight_4", '0 28 0' + '32 0 0' * (4 + TIME_DECIMALS), '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
 \r
-               Sbar_DrawXNum(score_pos + '335 0 0' - TIME_DECIMALS * '30 0 0', racemsec, -TIME_DECIMALS, 0, 30, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-               Sbar_DrawXNum(score_pos + '335 0 0' - TIME_DECIMALS * '30 0 0'  - '66 0 0', racesec, -2, 0, 30, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-               drawpic(score_pos + '335 0 0' - TIME_DECIMALS * '30 0 0' - '18 0 0', "gfx/hud/num_dot", '30 30 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
+               Sbar_DrawXNum(score_pos + '192 0 0' - TIME_DECIMALS * '30 0 0', racemsec, -TIME_DECIMALS, 0, 30, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+               Sbar_DrawXNum(score_pos + '192 0 0' - TIME_DECIMALS * '30 0 0'  - '66 0 0', racesec, -2, 0, 30, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+               drawstring(score_pos + '192 0 0' - TIME_DECIMALS * '30 0 0' - '18 0 0', ".", '30 30 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
 \r
-               Sbar_DrawXNum(score_pos + '335 0 0' - TIME_DECIMALS * '30 0 0' - '132 0 0', racemin, -2, 0, 30, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-               drawpic(score_pos + '335 0 0' - TIME_DECIMALS * '30 0 0' - '84 0 0', "gfx/hud/num_colon", '30 30 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
+               Sbar_DrawXNum(score_pos + '192 0 0' - TIME_DECIMALS * '30 0 0' - '132 0 0', racemin, -2, 0, 30, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+               drawstring(score_pos + '192 0 0' - TIME_DECIMALS * '30 0 0' - '84 0 0', ":", '30 30 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
 \r
        } else if (!teamplay) { // non-teamgames, except race/cts\r
                // me vector := [team/connected frags id]\r
@@ -3020,24 +3020,24 @@ void Sbar_Draw (void)
                }\r
 \r
                vector health_pos, armor_pos;\r
-               health_pos = bottom - '77 58 0';\r
-               armor_pos = bottom - '62 68 0';\r
+               health_pos = bottom - '60 58 0';\r
+               armor_pos = bottom - '52.5 68 0';\r
 \r
                // armor\r
                x = armor;\r
                if (x > 0)\r
                {\r
-                       drawpic(armor_pos + '10.5 -13.5 0', "gfx/hud/sb_armor", '16 16 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-                       if(x < 100) armor_pos_x -= 4.5; // always center\r
-                       if(x < 10) armor_pos_x -= 7; // always center\r
+                       drawpic(armor_pos + '0 -13.5 0', "gfx/hud/sb_armor", '16 16 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                       if(x < 100) armor_pos_x += 2.5; // always center\r
+                       if(x < 10) armor_pos_x += 2.5; // always center\r
                        Sbar_DrawXNum_Colored(armor_pos, x, 12, sbar_alpha_fg);\r
                }\r
 \r
                // health\r
                x = health;\r
-               drawpic(health_pos + '22 16 0', "gfx/hud/sb_health", '32 32 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-               //if(x < 100) health_pos_x -= 9; // always center\r
-               //if(x < 10) health_pos_x -= 11; // always center\r
+               drawpic(health_pos + '4.5 16 0', "gfx/hud/sb_health", '32 32 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+               if(x < 100) health_pos_x += 5; // always center\r
+               if(x < 10) health_pos_x += 5; // always center\r
                Sbar_DrawXNum_Colored(health_pos, x, 22, sbar_alpha_fg);\r
 \r
                // ammo\r