Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
cl_clanarena.qh File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void HUD_Mod_CA (vector myPos, vector mySize)
void HUD_Mod_CA_Draw (vector myPos, vector mySize, int layout)
void HUD_Mod_CA_Export (int fh)

Variables

int autocvar_hud_panel_modicons_ca_layout

Function Documentation

◆ HUD_Mod_CA()

void HUD_Mod_CA ( vector myPos,
vector mySize )

Definition at line 85 of file cl_clanarena.qc.

86{
87 mod_active = 1; // required in each mod function that always shows something
88
90}
void HUD_Mod_CA_Draw(vector myPos, vector mySize, int layout)
int autocvar_hud_panel_modicons_ca_layout
bool mod_active
Definition modicons.qh:7

◆ HUD_Mod_CA_Draw()

void HUD_Mod_CA_Draw ( vector myPos,
vector mySize,
int layout )

Definition at line 56 of file cl_clanarena.qc.

57{
58 int rows, columns;
59 float aspect_ratio;
60 aspect_ratio = (layout) ? 2 : 1;
61 rows = HUD_GetRowCount(team_count, mySize, aspect_ratio);
62 columns = ceil(team_count/rows);
63
64 int i;
65 float row = 0, column = 0;
66 vector pos = '0 0 0', itemSize;
67 itemSize = vec2(mySize.x / columns, mySize.y / rows);
68 for(i=0; i<team_count; ++i)
69 {
70 pos.x = myPos.x + column * itemSize.x;
71 pos.y = myPos.y + row * itemSize.y;
72
73 DrawCAItem(pos, itemSize, aspect_ratio, layout, i);
74
75 ++row;
76 if(row >= rows)
77 {
78 row = 0;
79 ++column;
80 }
81 }
82}
void DrawCAItem(vector myPos, vector mySize, float aspect_ratio, int layout, int i)
float team_count
Definition main.qh:59
float HUD_GetRowCount(int item_count, vector size, float item_aspect)
Definition hud.qc:165
float ceil(float f)
vector
Definition self.qh:92
#define vec2(...)
Definition vector.qh:90

References ceil(), DrawCAItem(), HUD_GetRowCount(), team_count, vec2, and vector.

Referenced by HUD_Mod_CA(), and HUD_Mod_FreezeTag().

◆ HUD_Mod_CA_Export()

void HUD_Mod_CA_Export ( int fh)

Definition at line 7 of file cl_clanarena.qc.

8{
9 HUD_Write_Cvar("hud_panel_modicons_ca_layout");
10}
#define HUD_Write_Cvar(cvar)
Definition hud_config.qh:40

Variable Documentation

◆ autocvar_hud_panel_modicons_ca_layout

int autocvar_hud_panel_modicons_ca_layout

Definition at line 3 of file cl_clanarena.qh.

Referenced by HUD_Mod_CA().