X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud%2Fpanel%2Fscore.qc;h=32db0a29fbf6d16ec6d478319fd20fc2b76e45d2;hp=4b5df98d19892d237ba925b62f7439afd398eabe;hb=5be2c6f1762b829c880f607c6de65a79f9b525de;hpb=268f9c69576b6bb929f66d19f0d077d19ba47edd diff --git a/qcsrc/client/hud/panel/score.qc b/qcsrc/client/hud/panel/score.qc index 4b5df98d1..32db0a29f 100644 --- a/qcsrc/client/hud/panel/score.qc +++ b/qcsrc/client/hud/panel/score.qc @@ -1,12 +1,22 @@ #include "score.qh" +#include +#include +#include #include "scoreboard.qh" #include +#include #include +#include // Score (#7) -void Scoreboard_UpdatePlayerTeams(); +void HUD_Score_Export(int fh) +{ + // allow saving cvars that aesthetically change the panel into hud skin files + HUD_Write_Cvar("hud_panel_score_rankings"); +} + void HUD_Score_Rankings(vector pos, vector mySize, entity me) { float score; @@ -36,8 +46,8 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me) players_per_team = max(2, ceil((entries - 1) / team_count)); for(i=0; i 3) @@ -273,7 +283,7 @@ void HUD_Score() } } else - score_size = eX * mySize.x*(1/4) + eY * mySize.y*(1/3); + score_size = vec2(mySize.x / 4, mySize.y / 3); float max_fragcount; max_fragcount = -99; @@ -294,7 +304,7 @@ void HUD_Score() if (spectatee_status == -1) { - score_pos = pos + eX * column * (score_size.x + offset.x) + eY * row * (score_size.y + offset.y); + score_pos = pos + vec2(column * (score_size.x + offset.x), row * (score_size.y + offset.y)); if (max_fragcount == score) HUD_Panel_DrawHighlight(score_pos, score_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); drawstring_aspect(score_pos, ftos(score), score_size, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL); @@ -307,12 +317,12 @@ void HUD_Score() } else if(tm.team == myteam) { if (max_fragcount == score) - HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); - drawstring_aspect(pos, ftos(score), eX * 0.75 * mySize.x + eY * mySize.y, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL); + HUD_Panel_DrawHighlight(pos, vec2(0.75 * mySize.x, mySize.y), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); + drawstring_aspect(pos, ftos(score), vec2(0.75 * mySize.x, mySize.y), Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL); } else { if (max_fragcount == score) - HUD_Panel_DrawHighlight(pos + eX * 0.75 * mySize.x + eY * (1/3) * rows * mySize.y, score_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); - drawstring_aspect(pos + eX * 0.75 * mySize.x + eY * (1/3) * rows * mySize.y, ftos(score), score_size, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL); + HUD_Panel_DrawHighlight(pos + vec2(0.75 * mySize.x, (1/3) * rows * mySize.y), score_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); + drawstring_aspect(pos + vec2(0.75 * mySize.x, (1/3) * rows * mySize.y), ftos(score), score_size, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL); ++rows; } }