Xonotic
modicons.qc File Reference
+ Include dependency graph for modicons.qc:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void HUD_ModIcons ()
 
void HUD_ModIcons_Export (int fh)
 
void HUD_ModIcons_SetFunc ()
 

Variables

float mod_alpha
 

Function Documentation

◆ HUD_ModIcons()

void HUD_ModIcons ( )

Definition at line 26 of file modicons.qc.

References autocvar__hud_configure, autocvar_hud_panel_modicons, autocvar_hud_panel_modicons_dynamichud, draw_beginBoldFont, draw_endBoldFont, frametime, HUD_Mod_CTF(), HUD_ModIcons_GameType(), HUD_Panel_DrawBg, HUD_Panel_LoadCvars(), HUD_Scale_Disable(), HUD_Scale_Enable(), max(), min(), mod_active, mod_alpha, panel_bg_padding, panel_fade_alpha, panel_pos, and panel_size.

27 {
29  {
30  if(!autocvar_hud_panel_modicons) return;
31  if(!HUD_ModIcons_GameType) return;
32  }
33 
35  mod_alpha = min(mod_alpha + frametime * 2, 1);
36  else
37  mod_alpha = max(mod_alpha - frametime * 2, 0);
38 
39  //if(mod_alpha <= 0)
40  // return;
43 
45 
48  else
50 
52 
54  {
55  panel_pos += '1 1 0' * panel_bg_padding;
56  panel_size -= '2 2 0' * panel_bg_padding;
57  }
58 
61  else
63 
65 }
#define draw_endBoldFont()
Definition: draw.qh:5
float mod_alpha
Definition: modicons.qc:24
bool autocvar_hud_panel_modicons_dynamichud
Definition: modicons.qh:5
bool autocvar__hud_configure
Definition: hud_config.qh:3
bool mod_active
Definition: modicons.qh:7
#define draw_beginBoldFont()
Definition: draw.qh:4
float panel_fade_alpha
Definition: hud.qh:410
vector panel_size
Definition: hud.qh:160
void HUD_Scale_Disable()
Definition: hud.qc:83
void HUD_Mod_CTF(vector pos, vector mySize)
Definition: cl_ctf.qc:21
#define HUD_Panel_DrawBg()
Definition: hud.qh:54
void HUD_Scale_Enable()
Definition: hud.qc:90
float frametime
Definition: csprogsdefs.qc:17
vector panel_pos
Definition: hud.qh:159
bool autocvar_hud_panel_modicons
Definition: modicons.qh:4
var void HUD_ModIcons_GameType(vector pos, vector size)
void HUD_Panel_LoadCvars()
Definition: hud.qc:216
float panel_bg_padding
Definition: hud.qh:171
+ Here is the call graph for this function:

◆ HUD_ModIcons_Export()

void HUD_ModIcons_Export ( int  fh)

Definition at line 12 of file modicons.qc.

References FOREACH.

13 {
14  // allow saving cvars that aesthetically change the panel into hud skin files
15 
16  FOREACH(Gametypes, it.m_modicons_export, it.m_modicons_export(fh));
17 }
#define FOREACH(list, cond, body)
Definition: iter.qh:19

◆ HUD_ModIcons_SetFunc()

void HUD_ModIcons_SetFunc ( )

Definition at line 19 of file modicons.qc.

References gametype, and HUD_ModIcons_GameType().

Referenced by NET_HANDLE().

20 {
21  HUD_ModIcons_GameType = gametype.m_modicons;
22 }
entity gametype
Definition: main.qh:30
var void HUD_ModIcons_GameType(vector pos, vector size)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ mod_alpha

float mod_alpha

Definition at line 24 of file modicons.qc.

Referenced by HUD_ModIcons().