]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/client/hud/hud.qh
dcc72efff555a45389af73cb0da5fc46f98a4a59
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / hud.qh
1 #pragma once
2
3 #include <common/weapons/_all.qh>
4 #include <common/scores.qh>
5
6 void Hud_Dynamic_Frame();
7
8 bool HUD_Radar_Clickable();
9 void HUD_Radar_Mouse();
10
11 REGISTRY(hud_panels, BITS(6))
12 #define hud_panels_from(i) _hud_panels_from(i, NULL)
13 REGISTER_REGISTRY(hud_panels)
14
15 #define REGISTER_HUD_PANEL(id, draw_func, configflags, showflags) \
16         void draw_func(); \
17         REGISTER(hud_panels, HUD_PANEL, id, m_id, new_pure(hud_panel)) { \
18                 this.panel_id = this.m_id; \
19                 this.panel_draw = draw_func; \
20                 this.panel_name = strzone(strtolower(#id)); \
21                 this.panel_configflags = configflags; \
22                 this.panel_showflags = showflags; \
23         }
24
25 #define HUD_PANEL(NAME) HUD_PANEL_##NAME
26
27 // draw the background/borders
28 #define HUD_Panel_DrawBg() MACRO_BEGIN { \
29         if(panel.current_panel_bg != "0" && panel.current_panel_bg != "") \
30                 draw_BorderPicture( \
31                         HUD_Shift(panel_pos - '1 1 0' * panel_bg_border), \
32                         panel.current_panel_bg, \
33                         HUD_Scale(panel_size + '1 1 0' * 2 * panel_bg_border), \
34                         panel_bg_color, panel_bg_alpha, \
35                         HUD_Scale('1 1 0' * BORDER_MULTIPLIER * panel_bg_border) \
36                 ); \
37 } MACRO_END
38
39 int panel_order[hud_panels_MAX];
40 string hud_panelorder_prev;
41
42 bool hud_draw_maximized;
43 bool hud_panel_radar_maximized;
44 bool hud_panel_radar_mouse;
45 float hud_panel_radar_bottom;
46 bool hud_panel_radar_temp_hidden;
47 bool chat_panel_modified;
48 bool radar_panel_modified;
49
50 float HUD_Radar_InputEvent(float bInputType, float nPrimary, float nSecondary);
51 void HUD_Radar_Hide_Maximized();
52
53 float HUD_GetRowCount(int item_count, vector size, float item_aspect);
54 vector HUD_Get_Num_Color (float hp, float maxvalue);
55 void DrawNumIcon(vector myPos, vector mySize, float theTime, string icon, bool vertical, bool icon_right_align, vector color, float theAlpha);
56 void DrawNumIcon_expanding(vector myPos, vector mySize, float theTime, string icon, bool vertical, int icon_right_align, vector color, float theAlpha, float fadelerp);
57 void HUD_Panel_DrawHighlight(vector pos, vector mySize, vector color, float theAlpha, int drawflag);
58 vector HUD_GetTableSize_BestItemAR(int item_count, vector psize, float item_aspect);
59
60 void HUD_Reset ();
61 void HUD_Main ();
62
63 int race_CheckName(string net_name);
64 string MakeRaceString(int cp, float mytime, float theirtime, float othertime, float lapdelta, string theirname);
65
66 int vote_yescount;
67 int vote_nocount;
68 int vote_needed;
69 int vote_highlighted; // currently selected vote
70
71 int vote_active; // is there an active vote?
72 int vote_prev; // previous state of vote_active to check for a change
73 float vote_alpha;
74 float vote_change; // "time" when vote_active changed
75
76 float hud_panel_quickmenu;
77
78 vector mousepos;
79 vector panel_click_distance; // mouse cursor distance from the top left corner of the panel (saved only upon a click)
80 vector panel_click_resizeorigin; // coordinates for opposite point when resizing
81 float resizeCorner; // 1 = topleft, 2 = topright, 3 = bottomleft, 4 = bottomright
82 entity highlightedPanel;
83 float highlightedAction; // 0 = nothing, 1 = move, 2 = resize
84
85 const float BORDER_MULTIPLIER = 4;
86 float scoreboard_bottom;
87 int weapon_accuracy[Weapons_MAX];
88
89 int complain_weapon;
90 float complain_weapon_type;
91 float complain_weapon_time;
92
93 PlayerScoreField ps_primary, ps_secondary;
94 int ts_primary, ts_secondary;
95
96 .Weapon last_switchweapon;
97 .Weapon last_activeweapon;
98 float weapontime;
99 float weaponprevtime;
100
101 float teamnagger;
102
103 int hudShiftState;
104 const int S_SHIFT = 1;
105 const int S_CTRL = 2;
106 const int S_ALT = 4;
107
108 float hud_fade_alpha;
109
110 string hud_skin_path;
111 string hud_skin_prev;
112
113 vector myteamcolors;
114
115 entity highlightedPanel_backup;
116 vector panel_pos_backup;
117 vector panel_size_backup;
118
119 vector panel_size_copied;
120
121 entity panel;
122 entityclass(HUDPanel);
123 class(HUDPanel) .string panel_name;
124 class(HUDPanel) .int panel_id;
125 class(HUDPanel) .vector current_panel_pos;
126 class(HUDPanel) .vector current_panel_size;
127 class(HUDPanel) .string current_panel_bg;
128 class(HUDPanel) .float current_panel_bg_alpha;
129 class(HUDPanel) .float current_panel_bg_border;
130 class(HUDPanel) .vector current_panel_bg_color;
131 class(HUDPanel) .float current_panel_bg_color_team;
132 class(HUDPanel) .float current_panel_bg_padding;
133 class(HUDPanel) .float current_panel_fg_alpha;
134 class(HUDPanel) .float update_time;
135 float panel_enabled;
136 vector panel_pos;
137 vector panel_size;
138 string panel_bg_str; // "_str" vars contain the raw value of the cvar, non-"_str" contains what hud.qc code should use
139 vector panel_bg_color;
140 string panel_bg_color_str;
141 float panel_bg_color_team;
142 string panel_bg_color_team_str;
143 float panel_fg_alpha;
144 float panel_bg_alpha;
145 string panel_bg_alpha_str;
146 float panel_bg_border;
147 string panel_bg_border_str;
148 float panel_bg_padding;
149 string panel_bg_padding_str;
150
151 class(HUDPanel) .void() panel_draw;
152
153 // chat panel can be reduced / moved while the mapvote is active
154 // let know the mapvote panel about chat pos and size
155 float chat_posy;
156 float chat_sizey;
157
158 float current_player;
159
160 float autocvar_hud_dynamic_follow;
161 float autocvar_hud_dynamic_follow_scale;
162 vector autocvar_hud_dynamic_follow_scale_xyz;
163
164 vector hud_dynamic_shake_realofs;
165 float hud_dynamic_shake_factor;
166 float hud_dynamic_shake_time;
167
168 // shared across viewmodel effects and dynamic hud code
169 vector cl_followmodel_ofs;
170 float cl_followmodel_time;
171
172 vector hud_scale;
173 vector hud_scale_current = '1 1 0';
174 vector hud_shift;
175 vector hud_shift_current = '0 0 0';
176 vector hud_scale_center;
177
178 float stringwidth_colors(string s, vector theSize);
179 float stringwidth_nocolors(string s, vector theSize);
180 void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag);
181
182 .int panel_showflags;
183 const int PANEL_SHOW_NEVER    = 0x00;
184 const int PANEL_SHOW_MAINGAME = 0x01;
185 const int PANEL_SHOW_MINIGAME = 0x02;
186 const int PANEL_SHOW_MAPVOTE  = 0x04;
187 const int PANEL_SHOW_WITH_SB  = 0x08;
188 const int PANEL_SHOW_ALWAYS   = 0xff;
189
190 .int panel_configflags;
191 const int PANEL_CONFIG_NO        = 0x00;
192 const int PANEL_CONFIG_MAIN      = 0x01;
193 const int PANEL_CONFIG_CANBEOFF  = 0x02; // panel can be disabled (if disabled it's displayed with a low alpha)
194
195
196 // prev_* vars contain the health/armor at the previous FRAME
197 // set to -1 when player is dead or was not playing
198 int prev_health, prev_armor;
199 float health_damagetime, armor_damagetime;
200 int health_beforedamage, armor_beforedamage;
201 // old_p_* vars keep track of previous values when smoothing value changes of the progressbar
202 int old_p_health, old_p_armor;
203 float old_p_healthtime, old_p_armortime;
204 // prev_p_* vars contain the health/armor progressbar value at the previous FRAME
205 // set to -1 to forcedly stop effects when we switch spectated player (e.g. from playerX: 70h to playerY: 50h)
206 int prev_p_health, prev_p_armor;
207
208 void HUD_ItemsTime();
209
210 REGISTER_HUD_PANEL(WEAPONS,         HUD_Weapons,        PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // WEAPONS
211 REGISTER_HUD_PANEL(AMMO,            HUD_Ammo,           PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // AMMO
212 REGISTER_HUD_PANEL(POWERUPS,        HUD_Powerups,       PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // POWERUPS
213 REGISTER_HUD_PANEL(HEALTHARMOR,     HUD_HealthArmor,    PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // HEALTHARMOR
214 REGISTER_HUD_PANEL(NOTIFY,          HUD_Notify,         PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME                                          ) // NOTIFY
215 REGISTER_HUD_PANEL(TIMER,           HUD_Timer,          PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME                      | PANEL_SHOW_WITH_SB) // TIMER
216 REGISTER_HUD_PANEL(RADAR,           HUD_Radar,          PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // RADAR
217 REGISTER_HUD_PANEL(SCORE,           HUD_Score,          PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME                                          ) // SCORE
218 REGISTER_HUD_PANEL(RACETIMER,       HUD_RaceTimer,      PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // RACETIMER
219 REGISTER_HUD_PANEL(VOTE,            HUD_Vote,           PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // VOTE
220 REGISTER_HUD_PANEL(MODICONS,        HUD_ModIcons,       PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                            | PANEL_SHOW_WITH_SB) // MODICONS
221 REGISTER_HUD_PANEL(PRESSEDKEYS,     HUD_PressedKeys,    PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // PRESSEDKEYS
222 REGISTER_HUD_PANEL(CHAT,            HUD_Chat,           PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // CHAT
223 REGISTER_HUD_PANEL(ENGINEINFO,      HUD_EngineInfo,     PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // ENGINEINFO
224 REGISTER_HUD_PANEL(INFOMESSAGES,    HUD_InfoMessages,   PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // INFOMESSAGES
225 REGISTER_HUD_PANEL(PHYSICS,         HUD_Physics,        PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // PHYSICS
226 REGISTER_HUD_PANEL(CENTERPRINT,     HUD_CenterPrint,    PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                            | PANEL_SHOW_WITH_SB) // CENTERPRINT
227 REGISTER_HUD_PANEL(MINIGAMEBOARD,   HUD_MinigameBoard,  PANEL_CONFIG_NO                          ,                       PANEL_SHOW_MINIGAME                      | PANEL_SHOW_WITH_SB) // MINIGAMEBOARD
228 REGISTER_HUD_PANEL(MINIGAMESTATUS,  HUD_MinigameStatus, PANEL_CONFIG_NO                          ,                       PANEL_SHOW_MINIGAME                      | PANEL_SHOW_WITH_SB) // MINIGAMESTATUS
229 REGISTER_HUD_PANEL(MINIGAMEHELP,    HUD_MinigameHelp,   PANEL_CONFIG_NO                          ,                       PANEL_SHOW_MINIGAME                      | PANEL_SHOW_WITH_SB) // MINIGAMEHELP
230 REGISTER_HUD_PANEL(MINIGAMEMENU,    HUD_MinigameMenu,   PANEL_CONFIG_NO                          , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // MINIGAMEMENU
231 REGISTER_HUD_PANEL(MAPVOTE,         MapVote_Draw,       PANEL_CONFIG_NO                          ,                                             PANEL_SHOW_MAPVOTE                     ) // MAPVOTE
232 REGISTER_HUD_PANEL(ITEMSTIME,       HUD_ItemsTime,      PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // ITEMSTIME
233 REGISTER_HUD_PANEL(QUICKMENU,       HUD_QuickMenu,      PANEL_CONFIG_MAIN                        , PANEL_SHOW_MAINGAME                                                                ) // QUICKMENU
234 REGISTER_HUD_PANEL(SCOREBOARD,      Scoreboard_Draw,    PANEL_CONFIG_NO                          , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // SCOREBOARD
235 // always add new panels to the end of list
236
237 // Because calling lots of functions in QC apparently cuts fps in half on many machines:
238 // ----------------------
239 // MACRO HELL STARTS HERE
240 // ----------------------
241 // Little help for the poor people who have to make sense of this: Start from the bottom ;)
242
243 // Get value for panel.current_panel_bg: if "" fetch default, else use panel_bg_str
244 // comment on last line of macro: // we probably want to see a background in config mode at all times...
245 #define HUD_Panel_GetBg() MACRO_BEGIN {                                                                             \
246         string panel_bg;                                                                                                \
247         if (!autocvar__hud_configure && panel_bg_str == "0") {                                                          \
248                 panel_bg = "0";                                                                                             \
249         } else {                                                                                                        \
250                 if (panel_bg_str == "") {                                                                                   \
251                         panel_bg_str = autocvar_hud_panel_bg;                                                                   \
252                 }                                                                                                           \
253                 if (panel_bg_str == "0" && !autocvar__hud_configure) {                                                      \
254                         panel_bg = "0";                                                                                         \
255                 } else {                                                                                                    \
256                         if (panel_bg_str == "0" && autocvar__hud_configure)                                                     \
257                                 panel_bg_alpha_str = "0";                                                                           \
258                         panel_bg = strcat(hud_skin_path, "/", panel_bg_str);                                                    \
259                         if (precache_pic(panel_bg) == "") {                                                                     \
260                                 panel_bg = strcat(hud_skin_path, "/", "border_default");                                            \
261                                 if (precache_pic(panel_bg) == "") {                                                                 \
262                                         panel_bg = strcat("gfx/hud/default/", "border_default");                                        \
263                                 }                                                                                                   \
264                         }                                                                                                       \
265                 }                                                                                                           \
266         }                                                                                                               \
267         strcpy(panel.current_panel_bg, panel_bg);                                                                       \
268 } MACRO_END
269
270 // Get value for panel_bg_color: if "" fetch default, else use panel_bg_color. Convert pants, shirt or teamcolor into a vector.
271 #define HUD_Panel_GetColor() MACRO_BEGIN {                                                                          \
272         if ((teamplay) && panel_bg_color_team > 0) {                                                                        \
273                 if (autocvar__hud_configure && myteam == NUM_SPECTATOR)                                                     \
274                         panel_bg_color = '1 0 0' * panel_bg_color_team;                                                         \
275                 else                                                                                                        \
276                         panel_bg_color = myteamcolors * panel_bg_color_team;                                                    \
277         } else if (autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && panel_bg_color_team > 0) {          \
278                 panel_bg_color = '1 0 0' * panel_bg_color_team;                                                             \
279         } else {                                                                                                        \
280                 if (panel_bg_color_str == "") {                                                                             \
281                         panel_bg_color = autocvar_hud_panel_bg_color;                                                           \
282                 } else {                                                                                                    \
283                         if (panel_bg_color_str == "shirt") {                                                                    \
284                                 panel_bg_color = colormapPaletteColor(floor(entcs_GetClientColors(current_player) / 16), 0); \
285                         } else if (panel_bg_color_str == "pants") {                                                             \
286                                 panel_bg_color = colormapPaletteColor(entcs_GetClientColors(current_player) % 16, 1); \
287                         } else {                                                                                                \
288                                 panel_bg_color = stov(panel_bg_color_str);                                                          \
289                         }                                                                                                       \
290                 }                                                                                                           \
291         }                                                                                                               \
292 } MACRO_END
293
294 // Get value for panel_bg_color_team: if "" fetch default, else use panel_bg_color_team_str
295 #define HUD_Panel_GetColorTeam() MACRO_BEGIN {                                                                      \
296         if (panel_bg_color_team_str == "") {                                                                            \
297                 panel_bg_color_team = autocvar_hud_panel_bg_color_team;                                                     \
298         } else {                                                                                                        \
299                 panel_bg_color_team = stof(panel_bg_color_team_str);                                                        \
300         }                                                                                                               \
301 } MACRO_END
302
303 // Get value for panel_bg_alpha: if "" fetch default, else use panel_bg_alpha. Also do various menu dialog fadeout/in checks, and minalpha checks
304 // comment on line 3 of macro: // do not set a minalpha cap when showing the config dialog for this panel
305 #define HUD_Panel_GetBgAlpha() MACRO_BEGIN {                                                                        \
306         if (panel_bg_alpha_str == "") {                                                                                 \
307                 panel_bg_alpha_str = ftos(autocvar_hud_panel_bg_alpha);                                                     \
308         }                                                                                                               \
309         panel_bg_alpha = stof(panel_bg_alpha_str);                                                                      \
310         if (autocvar__hud_configure) {                                                                                  \
311                 if (!panel_enabled)                                                                                         \
312                         panel_bg_alpha = 0.25;                                                                                  \
313                 else if (hud_configure_menu_open == 2 && panel == highlightedPanel)                                                    \
314                         panel_bg_alpha = (1 - autocvar__menu_alpha) * max(cvar("hud_configure_bg_minalpha"), panel_bg_alpha) + autocvar__menu_alpha * panel_bg_alpha;\
315                 else                                                                                                        \
316                         panel_bg_alpha = max(cvar("hud_configure_bg_minalpha"), panel_bg_alpha);                                \
317         }                                                                                                               \
318 } MACRO_END
319
320 // Get value for panel_fg_alpha. Also do various minalpha checks
321 // comment on line 2 of macro: // ALWAYS show disabled panels at 0.25 alpha when in config mode
322 #define HUD_Panel_GetFgAlpha() MACRO_BEGIN {                                                                        \
323         panel_fg_alpha = autocvar_hud_panel_fg_alpha;                                                                   \
324         if (autocvar__hud_configure && !panel_enabled)                                                                  \
325                 panel_fg_alpha = 0.25;                                                                                      \
326 } MACRO_END
327
328 // Get border. See comments above, it's similar.
329 #define HUD_Panel_GetBorder() MACRO_BEGIN {                                                                         \
330         if (panel_bg_border_str == "") {                                                                                \
331                 panel_bg_border = autocvar_hud_panel_bg_border;                                                             \
332         } else {                                                                                                        \
333                 panel_bg_border = stof(panel_bg_border_str);                                                                \
334         }                                                                                                               \
335 } MACRO_END
336
337 // Get padding. See comments above, it's similar.
338 // last line is a port of the old function, basically always make sure the panel contents are at least 5 pixels tall/wide, to disallow extreme padding values
339 #define HUD_Panel_GetPadding() MACRO_BEGIN {                                                                        \
340         if (panel_bg_padding_str == "") {                                                                               \
341                 panel_bg_padding = autocvar_hud_panel_bg_padding;                                                           \
342         } else {                                                                                                        \
343                 panel_bg_padding = stof(panel_bg_padding_str);                                                              \
344         }                                                                                                               \
345         panel_bg_padding = min(min(panel_size.x, panel_size.y)/2 - 5, panel_bg_padding);                                \
346 } MACRO_END
347
348 // return smoothly faded pos and size of given panel when a dialog is active
349 // don't center too wide panels, it doesn't work with different resolutions
350 #define HUD_Panel_UpdatePosSize_ForMenu() MACRO_BEGIN { \
351         vector new_size = panel_size; \
352         float max_panel_width = 0.52 * vid_conwidth; \
353         if(panel_size.x > max_panel_width) \
354         { \
355                 new_size.x = max_panel_width; \
356                 new_size.y = panel_size.y * (new_size.x / panel_size.x); \
357         } \
358         vector new_pos = vec2(panel_bg_border + 0.5 * max_panel_width, 0.5 * vid_conheight) - 0.5 * new_size; \
359         panel_pos = (1 - autocvar__menu_alpha) * panel_pos + (autocvar__menu_alpha) * new_pos; \
360         panel_size = (1 - autocvar__menu_alpha) * panel_size + (autocvar__menu_alpha) * new_size; \
361 } MACRO_END
362
363 // Scale the pos and size vectors to absolute coordinates
364 #define HUD_Panel_ScalePosSize() MACRO_BEGIN {                                                                      \
365         panel_pos.x *= vid_conwidth;  panel_pos.y *= vid_conheight;                                                     \
366         panel_size.x *= vid_conwidth; panel_size.y *= vid_conheight;                                                    \
367 } MACRO_END
368
369 float panel_fade_alpha;
370 void HUD_Panel_LoadCvars();
371
372 #define Hud_Panel_GetPanelEnabled() \
373         panel_enabled = ((panel.panel_configflags & PANEL_CONFIG_CANBEOFF) \
374                                         ? cvar(strcat("hud_panel_", panel.panel_name)) : true)
375
376 #define HUD_Panel_UpdatePosSize() MACRO_BEGIN {                                                                     \
377         Hud_Panel_GetPanelEnabled(); \
378         panel_pos = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_pos")));                                  \
379         panel_size = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_size")));                                \
380         HUD_Panel_ScalePosSize();                                                                                       \
381         if (hud_configure_menu_open == 2 && panel == highlightedPanel) {                                                           \
382                 HUD_Panel_UpdatePosSize_ForMenu();                                                                          \
383         }                                                                                                               \
384         panel_bg_border_str = cvar_string(strcat("hud_panel_", panel.panel_name, "_bg_border"));                        \
385         HUD_Panel_GetBorder();                                                                                          \
386 } MACRO_END
387
388 const int NOTIFY_MAX_ENTRIES = 10;
389 const float NOTIFY_ICON_MARGIN = 0.02;
390
391 int notify_index;
392 int notify_count;
393 float notify_times[NOTIFY_MAX_ENTRIES];
394 string notify_attackers[NOTIFY_MAX_ENTRIES];
395 string notify_victims[NOTIFY_MAX_ENTRIES];
396 string notify_icons[NOTIFY_MAX_ENTRIES];
397
398 void HUD_Notify_Push(string icon, string attacker, string victim);
399
400 var void HUD_ModIcons_GameType(vector pos, vector size);
401 void HUD_ModIcons_SetFunc();