3 #include <client/autocvars.qh>
4 #include <client/draw.qh>
5 #include <common/mapinfo.qh>
6 #include <common/ent_cs.qh>
7 #include <common/scores.qh>
8 #include <common/gamemodes/_mod.qh>
9 #include <common/gamemodes/gamemode/ctf/cl_ctf.qh>
13 void HUD_ModIcons_Export(int fh)
15 // allow saving cvars that aesthetically change the panel into hud skin files
17 FOREACH(Gametypes, it.m_modicons_export, it.m_modicons_export(fh));
20 void HUD_ModIcons_SetFunc()
22 HUD_ModIcons_GameType = gametype.m_modicons;
29 if(!autocvar__hud_configure)
31 if(!autocvar_hud_panel_modicons) return;
32 if(!HUD_ModIcons_GameType) return;
35 if(mod_active || autocvar__hud_configure)
36 mod_alpha = min(mod_alpha + frametime * 2, 1);
38 mod_alpha = max(mod_alpha - frametime * 2, 0);
42 panel_fade_alpha *= mod_alpha;
43 HUD_Panel_LoadCvars();
47 if (autocvar_hud_panel_modicons_dynamichud)
56 panel_pos += '1 1 0' * panel_bg_padding;
57 panel_size -= '2 2 0' * panel_bg_padding;
60 if(autocvar__hud_configure)
61 HUD_Mod_CTF(panel_pos, panel_size);
63 HUD_ModIcons_GameType(panel_pos, panel_size);