From: terencehill Date: Fri, 5 Aug 2016 20:33:17 +0000 (+0200) Subject: Add back left and right margin to the first and last column of the scoreboard (but... X-Git-Tag: xonotic-v0.8.2~716^2~17 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=099b7fc0a84703e1fc62d3b290295426b724316a;p=xonotic%2Fxonotic-data.pk3dir.git Add back left and right margin to the first and last column of the scoreboard (but with a different implementation) --- diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index c53971f40..34761ad89 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -713,7 +713,6 @@ string Scoreboard_FixColumnWidth(int i, string str) if(j != i) if (sbt_field[i] != SP_SEPARATOR) namesize -= sbt_field_size[j] + hud_fontsize.x; - namesize += hud_fontsize.x; sbt_field_size[i] = namesize; if (sbt_fixcolumnwidth_iconlen != 0) @@ -736,6 +735,7 @@ vector Scoreboard_DrawHeader(vector pos, vector rgb) int i; vector column_dim = eY * panel_size.y; vector text_offset = eY * (1.25 - 1) / 2 * hud_fontsize.y; + pos.x += hud_fontsize.x * 0.5; for(i = 0; i < sbt_num_fields; ++i) { if(sbt_field[i] == SP_SEPARATOR) @@ -749,7 +749,7 @@ vector Scoreboard_DrawHeader(vector pos, vector rgb) } if(sbt_field[i] == SP_SEPARATOR) { - pos.x = panel_pos.x + panel_size.x; + pos.x = panel_pos.x + panel_size.x - hud_fontsize.x * 0.5; for(i = sbt_num_fields - 1; i > 0; --i) { if(sbt_field[i] == SP_SEPARATOR) @@ -797,6 +797,7 @@ void Scoreboard_DrawItem(vector item_pos, vector rgb, entity pl, bool is_self, i drawfill(h_pos, h_size, rgb, sbt_highlight_alpha, DRAWFLAG_NORMAL); vector pos = item_pos; + pos.x += hud_fontsize.x * 0.5; pos.y += (1.25 - 1) / 2 * hud_fontsize.y; // center text vertically vector tmp = '0 0 0'; int i; @@ -849,7 +850,7 @@ void Scoreboard_DrawItem(vector item_pos, vector rgb, entity pl, bool is_self, i if(sbt_field[i] == SP_SEPARATOR) { - pos.x = item_pos.x + panel_size.x; + pos.x = item_pos.x + panel_size.x - hud_fontsize.x * 0.5; for(i = sbt_num_fields-1; i > 0; --i) { field = sbt_field[i];