From: otta8634 Date: Fri, 3 Jan 2025 16:58:17 +0000 (+0800) Subject: Color the 1st, 2nd, and 3rd scoreboard text X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cf0962fbe68c0a7a604ef6977350edae6c10a0b4;p=xonotic%2Fxonotic-data.pk3dir.git Color the 1st, 2nd, and 3rd scoreboard text Gave them generic trophy colors -- gold, silver, bronze. Ideally they'd have little trophy icons, maybe that can be done later/elsewhere. --- diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 810473aaf..299500902 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -2185,7 +2185,15 @@ vector Scoreboard_Rankings_Draw(vector pos, string ranktitle, entity pl, vector drawfill(pos, columnsize, hl_rgb, sbt_highlight_alpha, DRAWFLAG_NORMAL); str = count_ordinal(i+1); - drawstring(pos + text_ofs, str, hud_fontsize, '1 1 1', sbt_fg_alpha, DRAWFLAG_NORMAL); + vector rank_color; + switch(i) + { + case 0: rank_color = '0.933 0.733 0.200'; break; // 1st; gold + case 1: rank_color = '0.667 0.667 0.667'; break; // 2nd; silver + case 2: rank_color = '0.800 0.467 0.267'; break; // 3rd; bronze + default: rank_color = '1 1 1'; + } + drawstring(pos + text_ofs, str, hud_fontsize, rank_color, sbt_fg_alpha, DRAWFLAG_NORMAL); drawstring(pos + text_ofs + eX * ranksize, TIME_ENCODED_TOSTRING(t, true), hud_fontsize, '1 1 1', sbt_fg_alpha, DRAWFLAG_NORMAL); str = ColorTranslateRGB(grecordholder[i]); if(cut)