hud_num_fields = 0;
drawfont = hud_font;
+ hud_fontsize = HUD_GetFontsize("hud_fontsize");
for(i = 0; i < argc - 1; ++i)
{
tmp_y = 1.25 * hud_fontsize_y;
// rounded header
- drawpic(pos, "gfx/scoreboard/scoreboard_tableheader", tmp, (rgb * hud_color_bg_team) + '0.5 0.5 0.5', scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+ drawpic(pos, "gfx/scoreboard/scoreboard_tableheader", tmp, (rgb * autocvar_hud_color_bg_team) + '0.5 0.5 0.5', scoreboard_alpha_bg, DRAWFLAG_NORMAL);
// table border
tmp_y += hud_border_thickness;
// table background
tmp_y = body_table_height;
- drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * hud_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+ drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * autocvar_hud_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
// anyway, apply some color
//drawfill(pos, tmp + '2 0 0', rgb, 0.1, DRAWFLAG_NORMAL);
}
tmp_x = stringwidth(hud_title[i], FALSE, hud_fontsize);
- tmp_x = (hud_size[i] - tmp_x) * hud_fontsize_x;
+ tmp_x = (hud_size[i] - tmp_x);
drawstring(pos + tmp, hud_title[i], hud_fontsize, rgb * 1.5, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
pos_x -= hud_fontsize_x;
}
float i;
float weapon_hit, weapon_damage, weapon_stats;
float fontsize = 40 * 1/3;
- float weapon_cnt = 12;
+ float weapon_cnt = WEP_COUNT - 3; // either minstanex/nex are hidden, no port-o-launch, no tuba
float rows;
if(cvar("scoreboard_accuracy_doublerows"))
rows = 2;
tmp_x = sbwidth;
tmp_y = height * rows;
- drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * hud_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+ drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * autocvar_hud_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
drawborderlines(hud_accuracy_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg * 0.75, DRAWFLAG_NORMAL);
// column highlighting
self = get_weaponinfo(i);
if not(self.weapons)
continue;
- if ((i == WEP_NEX && g_minstagib) || i == WEP_PORTO || (i == WEP_MINSTANEX && !g_minstagib) || i == WEP_TUBA || i == WEP_FIREBALL) // skip port-o-launch, nex || minstanex, tuba and fireball
+ if ((i == WEP_NEX && g_minstagib) || i == WEP_PORTO || (i == WEP_MINSTANEX && !g_minstagib) || i == WEP_TUBA) // skip port-o-launch, nex || minstanex and tuba
continue;
weapon_hit = weapon_hits[i-WEP_FIRST];
weapon_damage = weapon_fired[i-WEP_FIRST];
weapon_alpha = 0.2 * scoreboard_alpha_fg;
// weapon icon
- drawpic(pos, strcat("gfx/hud/", cvar_string("hud_skin"), "/weapon", self.netname), '1 0 0' * sbwidth * (1/weapon_cnt) + '0 1 0' * height * (2/3), '1 1 1', weapon_alpha, DRAWFLAG_NORMAL);
+ drawpic_aspect(pos, strcat("gfx/hud/", cvar_string("hud_skin"), "/weapon", self.netname), '1 0 0' * sbwidth * (1/weapon_cnt) + '0 1 0' * height * (2/3), '1 1 1', weapon_alpha, DRAWFLAG_NORMAL);
// the accuracy
if(weapon_damage) {
weapons_with_stats += 1;
rgb_x = 0;
rgb_y = 1;
}
- else if(weapon_stats > autocvar_hud_weaponicons_accuracy_yellow) {
- rgb_x = 1 - (weapon_stats-autocvar_hud_weaponicons_accuracy_yellow)/(100-autocvar_hud_weaponicons_accuracy_yellow); // red value between 1 -> 0
+ else if(weapon_stats > autocvar_hud_panel_weapons_accuracy_yellow) {
+ rgb_x = 1 - (weapon_stats-autocvar_hud_panel_weapons_accuracy_yellow)/(100-autocvar_hud_panel_weapons_accuracy_yellow); // red value between 1 -> 0
rgb_y = 1;
} else {
rgb_x = 1;
- rgb_y = weapon_stats/autocvar_hud_weaponicons_accuracy_yellow; // green value between 0 -> 1
+ rgb_y = weapon_stats/autocvar_hud_panel_weapons_accuracy_yellow; // green value between 0 -> 1
}
rgb_z = 0;
drawstring(pos + '1 0 0' * padding + '0 1 0' * height * (2/3), s, '1 1 0' * fontsize, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
tmp_x = sbwidth;
tmp_y = hud_fontsize_y * RANKINGS_RECEIVED_CNT;
- drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * hud_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+ drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb * autocvar_hud_color_bg_team, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
drawborderlines(hud_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg * 0.75, DRAWFLAG_NORMAL);
// row highlighting