106 float entry_height =
size.y / entry_count;
108 float panel_width_half =
size.x * 0.5;
109 float icon_width_half = entry_height * icon_aspect * 0.5;
113 vector icon_size =
vec2(icon_aspect, 1) * entry_height;
114 vector icon_left =
eX * (panel_width_half - icon_width_half);
115 vector attacker_right =
eX * name_maxwidth;
118 vector attacker_pos, victim_pos, icon_pos;
119 string attacker, victim, icon;
144 attacker = sprintf(_(
"Player %d"),
count + 1);
145 victim = sprintf(_(
"Player %d"),
count + 2);
170 if (icon !=
"" && victim !=
"")
172 name_top =
eY * (i * entry_height + 0.5 * (entry_height - font_size.y));
174 icon_pos = pos + icon_left +
eY * i * entry_height;
178 victim_pos = pos + victim_left + name_top;
184 attacker_pos = pos + attacker_right -
eX *
stringwidth(attacker,
true, font_size) + name_top;
#define drawcolorcodedstring(position, text, scale, alpha, flag)
#define drawpic_aspect_skin(pos, pic, sz, color, theAlpha, drawflag)
string textShortenToWidth(string theText, float maxWidth, vector theFontSize, textLengthUpToWidth_widthFunction_t tw)
const float DRAWFLAG_NORMAL
void HUD_Panel_LoadCvars()
const float NOTIFY_ICON_MARGIN
float notify_times[NOTIFY_MAX_ENTRIES]
string notify_icons[NOTIFY_MAX_ENTRIES]
const int NOTIFY_MAX_ENTRIES
#define HUD_Panel_DrawBg()
string notify_attackers[NOTIFY_MAX_ENTRIES]
string notify_victims[NOTIFY_MAX_ENTRIES]
#define HUD_Write_Cvar(cvar)
bool autocvar__hud_configure
void HUD_Notify_Push(string icon, string attacker, string victim)
void HUD_Notify_Export(int fh)
float autocvar_hud_panel_notify_flip
bool autocvar_hud_panel_notify
float autocvar_hud_panel_notify_time
float autocvar_hud_panel_notify_fontsize
bool autocvar_hud_panel_notify_dynamichud
float autocvar_hud_panel_notify_fadetime
float autocvar_hud_panel_notify_icon_aspect
#define REGISTRY_GET(id, i)
float scoreboard_fade_alpha
ERASEABLE string ColorTranslateRGB(string s)
float stringwidth_colors(string s, vector theSize)
ERASEABLE float boxesoverlap(vector m1, vector m2, vector m3, vector m4)
requires that m2>m1 in all coordinates, and that m4>m3