From e25acdafacdc22af359f6bf675c929754a1351c4 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Thu, 14 Apr 2011 19:59:12 +0300 Subject: [PATCH] Re-position half of the HUD items properly with the new fonts. The other half to be done later. --- data/qcsrc/client/sbar.qc | 46 +++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index b5360a35..2e0d9b15 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -139,14 +139,14 @@ void Sbar_DrawXNum (vector pos, float num, float digits, float showminusplus, fl if(minus) { if (stroke == 1) - drawpic(pos, "gfx/hud/num_minus_stroke", vsize, rgb, alpha, dflags); - drawpic(pos, "gfx/hud/num_minus", vsize, num_color, alpha, dflags); + drawstring(pos, "-", vsize, rgb, alpha, dflags); + drawstring(pos, "-", vsize, num_color, alpha, dflags); pos_x += lettersize; } else if(plus) { if (stroke == 1) - drawpic(pos, "gfx/hud/num_plus_stroke", vsize, rgb, alpha, dflags); - drawpic(pos, "gfx/hud/num_plus", vsize, num_color, alpha, dflags); + drawstring(pos, "+", vsize, rgb, alpha, dflags); + drawstring(pos, "+", vsize, num_color, alpha, dflags); pos_x += lettersize; } @@ -1693,8 +1693,8 @@ void Sbar_Score() if(gametype == GAME_RPG) return; - score_pos = top + '-240 8 0'; - secondary_score_pos = score_pos + '210 -6 0'; + score_pos = top + '-80 8 0'; + secondary_score_pos = score_pos + '80 -6 0'; if((scores_flags[ps_primary] & SFL_TIME) && !teamplay) { // race/cts record display on HUD pl = players.sort_next; @@ -1734,20 +1734,20 @@ void Sbar_Score() distribution_color = '1 0 0'; minusplus = 2; // minusplus 1: always prefix with plus sign } - 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); - 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); - 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); + 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); + 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); + drawstring(score_pos + '216 -4 0' - '16 0 0' * TIME_DECIMALS, ".", '16 16 0', distribution_color, sbar_alpha_fg, DRAWFLAG_ADDITIVE); } // race record display if (distribution <= 0 || distribution == score) // draw the highlight background behind the timer if we have the lead - 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); + 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); - 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); - 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); - 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); + 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); + 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); + 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); - 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); - 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); + 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); + 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); } else if (!teamplay) { // non-teamgames, except race/cts // me vector := [team/connected frags id] @@ -3020,24 +3020,24 @@ void Sbar_Draw (void) } vector health_pos, armor_pos; - health_pos = bottom - '77 58 0'; - armor_pos = bottom - '62 68 0'; + health_pos = bottom - '60 58 0'; + armor_pos = bottom - '52.5 68 0'; // armor x = armor; if (x > 0) { - drawpic(armor_pos + '10.5 -13.5 0', "gfx/hud/sb_armor", '16 16 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - if(x < 100) armor_pos_x -= 4.5; // always center - if(x < 10) armor_pos_x -= 7; // always center + drawpic(armor_pos + '0 -13.5 0', "gfx/hud/sb_armor", '16 16 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + if(x < 100) armor_pos_x += 2.5; // always center + if(x < 10) armor_pos_x += 2.5; // always center Sbar_DrawXNum_Colored(armor_pos, x, 12, sbar_alpha_fg); } // health x = health; - drawpic(health_pos + '22 16 0', "gfx/hud/sb_health", '32 32 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - //if(x < 100) health_pos_x -= 9; // always center - //if(x < 10) health_pos_x -= 11; // always center + drawpic(health_pos + '4.5 16 0', "gfx/hud/sb_health", '32 32 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + if(x < 100) health_pos_x += 5; // always center + if(x < 10) health_pos_x += 5; // always center Sbar_DrawXNum_Colored(health_pos, x, 22, sbar_alpha_fg); // ammo -- 2.39.2