// Only some HUD components can be customized here at the time.\r
-// Components left to do: Timer, Scores, Portrait, Sbar ring, "HUD disabled" warnings.\r
+// Components left to do: Timer, Portrait, Sbar ring, "HUD disabled" warnings, some race timers, some spectator messages,.\r
\r
set hud_panel_status_background_position "0 -0.85 0"\r
set hud_panel_status_background_scale "0.2 0.15 0"\r
\r
+set hud_item_score_race_primary_text_position "0 0.95 0"\r
+set hud_item_score_race_primary_text_scale 30\r
+set hud_item_score_race_secondary_text_position "-0.225 0.95 0"\r
+set hud_item_score_race_secondary_text_scale 14\r
+set hud_item_score_team_primary_text_position "0 0.95 0"\r
+set hud_item_score_team_primary_text_scale 34\r
+set hud_item_score_team_secondary_text_position "-0.2 0.965 0"\r
+set hud_item_score_team_secondary_text_scale 16\r
+set hud_item_score_team_secondary_entry_spacing "0 -1.25 0"\r
+set hud_item_score_nonteam_primary_text_position "0 0.95 0"\r
+set hud_item_score_nonteam_primary_text_scale 34\r
+set hud_item_score_nonteam_secondary_text_position "-0.2 0.965 0"\r
+set hud_item_score_nonteam_secondary_text_scale 16\r
+\r
set hud_item_weapon_position "0 -0.85 0"\r
set hud_item_weapon_scale "0.2 0.15 0"\r
\r
distribution_color = '1 1 1';\r
\r
secondary_racetime = strcat(secondary_racetime, ftos(distsec), ".", ftos(distmsec));\r
- drawstring(score_pos + '222 0 0' - '14 0 0', secondary_racetime, '14 14 0', distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawstring(Sbar_ConvertToScreen_TextPosition(secondary_racetime, stov(cvar_string("hud_item_score_race_secondary_text_position")), cvar("hud_item_score_race_secondary_text_scale")), secondary_racetime, '1 1 0' * cvar("hud_item_score_race_secondary_text_scale"), distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
\r
racetime = strcat(s_racemin, " : ", s_racesec, " . ", s_racemsec);\r
race_score_pos = top + '0 0 0';\r
race_score_pos -= '1 0 0' * stringwidth(racetime, FALSE, '30 30 0') * 0.5;\r
- drawstring(race_score_pos, racetime, '30 30 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawString(racetime, stov(cvar_string("hud_item_score_race_primary_text_position")), cvar("hud_item_score_race_primary_text_scale"));\r
\r
} else if (!teamplay) { // non-teamgames, except race/cts\r
// me vector := [team/connected frags id]\r
else\r
distribution_color = '1 0 0';\r
\r
- Sbar_DrawXNum(secondary_score_pos, distribution, 6, 3, 16, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- Sbar_DrawXNum(score_pos, score, 6, 0, 34, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(stov(cvar_string("hud_item_score_nonteam_secondary_text_position")), distribution, 6, 3, cvar("hud_item_score_nonteam_secondary_text_scale"), distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(stov(cvar_string("hud_item_score_nonteam_primary_text_position")), score, 6, 0, cvar("hud_item_score_nonteam_primary_text_scale"), distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
} else { // teamgames\r
float max_fragcount;\r
max_fragcount = -999;\r
\r
+ vector pos = stov(cvar_string("hud_item_score_team_secondary_text_position"));\r
+ vector sz = '1 1 0' * cvar("hud_item_score_team_secondary_text_scale");\r
+ sz_x = sz_x / vid_conwidth;\r
+ sz_y = sz_y / vid_height * 2;\r
+ vector dir = stov(cvar_string("hud_item_score_team_secondary_entry_spacing"));\r
for(tm = teams.sort_next; tm; tm = tm.sort_next) {\r
if(tm.team == COLOR_SPECTATOR || !tm.team_size) // no players? don't display\r
continue;\r
\r
if (score > max_fragcount)\r
max_fragcount = score;\r
- \r
+\r
if(tm.team == myteam) {\r
if (max_fragcount == score)\r
leader = 1;\r
- Sbar_DrawXNum(score_pos, score, 6, 0, 34, GetTeamRGB(tm.team), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(stov(cvar_string("hud_item_score_team_primary_text_position")), score, 6, 0, cvar("hud_item_score_team_primary_text_scale"), GetTeamRGB(tm.team), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
} else {\r
if (max_fragcount == score)\r
leader = 1;\r
- Sbar_DrawXNum(secondary_score_pos, score, 6, 3, 16, GetTeamRGB(tm.team), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- secondary_score_pos = secondary_score_pos + '0 16 0';\r
+ Sbar_DrawXNum(pos, score, 6, 3, cvar("hud_item_score_team_secondary_text_scale"), GetTeamRGB(tm.team), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ pos_x += sz_x * dir_x;\r
+ pos_y += sz_y * dir_y;\r
}\r
}\r
}\r