109 float entry_height = size.y / entry_count;
111 float panel_width_half = size.x * 0.5;
112 float icon_width_half = entry_height * icon_aspect / 2;
113 float name_maxwidth = panel_width_half - icon_width_half - size.x *
NOTIFY_ICON_MARGIN;
116 vector icon_size =
vec2(icon_aspect, 1) * entry_height;
117 vector icon_left =
eX * (panel_width_half - icon_width_half);
118 vector attacker_right =
eX * name_maxwidth;
119 vector victim_left =
eX * (size.x - name_maxwidth);
121 vector attacker_pos, victim_pos, icon_pos;
122 string attacker, victim, icon;
123 int i, j,
count, step, limit;
145 attacker = sprintf(_(
"Player %d"), count + 1);
146 victim = sprintf(_(
"Player %d"), count + 2);
148 alpha =
bound(0, 1.2 - count / entry_count, 1);
157 else if (fade_time != 0)
171 if (icon !=
"" && victim !=
"")
173 vector name_top =
eY * (i * entry_height + 0.5 * (entry_height - font_size.y));
175 icon_pos = pos + icon_left +
eY * i * entry_height;
179 victim_pos = pos + victim_left + name_top;
185 attacker_pos = pos + attacker_right -
eX *
stringwidth(attacker,
true, font_size) + name_top;
string notify_attackers[NOTIFY_MAX_ENTRIES]
bool autocvar__hud_configure
float autocvar_hud_panel_notify_fontsize
#define REGISTRY_GET(id, i)
string textShortenToWidth(string theText, float maxWidth, vector theFontSize, textLengthUpToWidth_widthFunction_t tw)
float autocvar_hud_panel_notify_icon_aspect
float notify_times[NOTIFY_MAX_ENTRIES]
float autocvar_hud_panel_notify_flip
#define HUD_Panel_DrawBg()
#define drawpic_aspect_skin(pos, pic, sz, color, theAlpha, drawflag)
ERASEABLE float boxesoverlap(vector m1, vector m2, vector m3, vector m4)
requires that m2>m1 in all coordinates, and that m4>m3
const int NOTIFY_MAX_ENTRIES
bool autocvar_hud_panel_notify_dynamichud
ERASEABLE string ColorTranslateRGB(string s)
const float DRAWFLAG_NORMAL
string notify_icons[NOTIFY_MAX_ENTRIES]
vector(float skel, float bonenum) _skel_get_boneabs_hidden
const float NOTIFY_ICON_MARGIN
void HUD_Notify_Push(string icon, string attacker, string victim)
bool autocvar_hud_panel_notify
void HUD_Notify_Export(int fh)
float autocvar_hud_panel_notify_time
#define HUD_Write_Cvar(cvar)
float scoreboard_fade_alpha
string notify_victims[NOTIFY_MAX_ENTRIES]
float autocvar_hud_panel_notify_fadetime
void HUD_Panel_LoadCvars()