drawstring_aspect(myPos, ftos(stat), mySize, color, panel_fg_alpha, DRAWFLAG_NORMAL);
}
-// Clan Arena and Freeze Tag HUD modicons
-void HUD_Mod_CA(vector myPos, vector mySize)
+void HUD_Mod_CA_Draw(vector myPos, vector mySize, int layout)
{
- mod_active = 1; // required in each mod function that always shows something
-
- int layout;
- if(ISGAMETYPE(CA))
- layout = autocvar_hud_panel_modicons_ca_layout;
- else //if(ISGAMETYPE(FREEZETAG))
- layout = autocvar_hud_panel_modicons_freezetag_layout;
int rows, columns;
float aspect_ratio;
aspect_ratio = (layout) ? 2 : 1;
}
}
}
+
+// Clan Arena and Freeze Tag HUD modicons
+void HUD_Mod_CA(vector myPos, vector mySize)
+{
+ mod_active = 1; // required in each mod function that always shows something
+
+ HUD_Mod_CA_Draw(myPos, mySize, autocvar_hud_panel_modicons_ca_layout);
+}
#pragma once
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);
#include "cl_freezetag.qh"
+#include <common/gamemodes/gamemode/clanarena/cl_clanarena.qh>
+
void HUD_Mod_FreezeTag_Export(int fh)
{
HUD_Write_Cvar("hud_panel_modicons_freezetag_layout");
}
+
+void HUD_Mod_FreezeTag(vector myPos, vector mySize)
+{
+ mod_active = 1; // required in each mod function that always shows something
+
+ HUD_Mod_CA_Draw(myPos, mySize, autocvar_hud_panel_modicons_freezetag_layout);
+}
#endif
#ifdef CSQC
+void HUD_Mod_FreezeTag(vector myPos, vector mySize);
void HUD_Mod_FreezeTag_Export(int fh);
#endif
CLASS(FreezeTag, Gametype)
returns(menu, _("Frag limit:"), 5, 100, 5, "fraglimit_override", "g_freezetag_teams_override", _("The amount of frags needed before the match will end"));
}
#ifdef CSQC
- ATTRIB(FreezeTag, m_modicons, void(vector pos, vector mySize), HUD_Mod_CA);
+ ATTRIB(FreezeTag, m_modicons, void(vector pos, vector mySize), HUD_Mod_FreezeTag);
ATTRIB(FreezeTag, m_modicons_export, void(int fh), HUD_Mod_FreezeTag_Export);
#endif
ATTRIB(FreezeTag, m_legacydefaults, string, "10 20 0");