bool autocvar_hud_panel_infomessages_flip;
float autocvar_hud_panel_mapvote_highlight_border = 1;
bool autocvar_hud_panel_modicons;
-int autocvar_hud_panel_modicons_ca_layout;
-int autocvar_hud_panel_modicons_freezetag_layout;
+//int autocvar_hud_panel_modicons_ca_layout;
+//int autocvar_hud_panel_modicons_freezetag_layout;
bool autocvar_hud_panel_notify;
float autocvar_hud_panel_notify_fadetime;
float autocvar_hud_panel_notify_flip;
if(!HUD_ModIcons_GameType) return;
}
- if(spectatee_status && teamplay) return; // z411
-
if(mod_active || autocvar__hud_configure)
mod_alpha = min(mod_alpha + frametime * 2, 1);
else
}*/
- // Basic team stats
+ // z411 Basic team stats
if (team_count)
{
i = 0;
drawfill(pos, eX * mySize.x + eY * fontsize.y, rgb, highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
- s = Team_CustomName(tm.team);
- //s = textShortenToWidth(Team_ColorName(tm.team), name_size, fontsize, stringwidth_colors);
score_color = Team_ColorRGB(tm.team) * 0.8;
+ // TODO secondary scores test, remove
+ if(gametype.m_modscores)
+ {
+ string icon;
+ if(tm.team == NUM_TEAM_1)
+ icon = "gfx/hud/luma/player_red";
+ else if(tm.team == NUM_TEAM_2)
+ icon = "gfx/hud/luma/player_blue";
+ else
+ icon = "gfx/hud/luma/player_neutral";
+
+ vector icon_sz = draw_getimagesize(icon);
+ vector icon_sz_new = vec2(fontsize.y*(icon_sz.x/icon_sz.y), fontsize.y);
+
+ s = ftos(gametype.m_modscores(tm.team));
+ float s_width = stringwidth(s, false, fontsize) + icon_sz_new.x;
+
+ //drawfill(pos, eX * s_width + eY * fontsize.y, score_color, panel_fg_alpha * 0.3, DRAWFLAG_NORMAL);
+ drawpic(pos, icon, icon_sz_new, '1 1 1', panel_fg_alpha * 0.7, DRAWFLAG_NORMAL);
+ drawstring(pos + eX * icon_sz_new.x, s, fontsize, '1 1 1', panel_fg_alpha * 0.7, DRAWFLAG_NORMAL);
+
+ s = textShortenToWidth(Team_CustomName(tm.team), name_size - s_width, fontsize, stringwidth_colors);
+ } else
+ s = textShortenToWidth(Team_CustomName(tm.team), name_size, fontsize, stringwidth_colors);
+ // TODO end
+
drawcolorcodedstring(pos + eX * (name_size - stringwidth(s, true, fontsize)), s, fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
draw_beginBoldFont();
#include "cl_clanarena.qh"
-#include <client/draw.qh>
+/*#include <client/draw.qh>
void HUD_Mod_CA_Export(int fh)
{
HUD_Mod_CA_Draw(myPos, mySize, autocvar_hud_panel_modicons_ca_layout);
}
+*/
+// Clan Arena and Freeze Tag scores
+int HUD_Scores_CA(int team)
+{
+ switch(team)
+ {
+ case NUM_TEAM_1: return STAT(REDALIVE);
+ case NUM_TEAM_2: return STAT(BLUEALIVE);
+ case NUM_TEAM_3: return STAT(YELLOWALIVE);
+ default:
+ case NUM_TEAM_4: return STAT(PINKALIVE);
+ }
+
+ return 0;
+}
\ No newline at end of file
#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);
+//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);
+int HUD_Scores_CA(int team);
#include <common/mapinfo.qh>
#ifdef CSQC
-void HUD_Mod_CA(vector pos, vector mySize);
-void HUD_Mod_CA_Export(int fh);
+//void HUD_Mod_CA(vector pos, vector mySize);
+//void HUD_Mod_CA_Export(int fh);
+int HUD_Scores_CA(int team);
#endif
CLASS(ClanArena, Gametype)
INIT(ClanArena)
returns(menu, _("Frag limit:"), 5, 100, 5, "fraglimit_override", "g_ca_teams_override", _("The amount of frags needed before the match will end"));
}
#ifdef CSQC
- ATTRIB(ClanArena, m_modicons, void(vector pos, vector mySize), HUD_Mod_CA);
- ATTRIB(ClanArena, m_modicons_export, void(int fh), HUD_Mod_CA_Export);
+ //ATTRIB(ClanArena, m_modicons, void(vector pos, vector mySize), HUD_Mod_CA);
+ //ATTRIB(ClanArena, m_modicons_export, void(int fh), HUD_Mod_CA_Export);
+ ATTRIB(ClanArena, m_modscores, int(int team), HUD_Scores_CA);
#endif
ATTRIB(ClanArena, m_legacydefaults, string, "10 20 0");
ENDCLASS(ClanArena)
#include "cl_freezetag.qh"
-#include <common/gamemodes/gamemode/clanarena/cl_clanarena.qh>
+//#include <common/gamemodes/gamemode/clanarena/cl_clanarena.qh>
-void HUD_Mod_FreezeTag_Export(int fh)
+/*void HUD_Mod_FreezeTag_Export(int fh)
{
HUD_Write_Cvar("hud_panel_modicons_freezetag_layout");
}
mod_active = 1; // required in each mod function that always shows something
HUD_Mod_CA_Draw(myPos, mySize, autocvar_hud_panel_modicons_freezetag_layout);
-}
+}*/
+
#pragma once
-void HUD_Mod_FreezeTag_Export(int fh);
+//void HUD_Mod_FreezeTag_Export(int fh);
#include <common/gamemodes/gamemode/clanarena/cl_clanarena.qh>
#endif
-#ifdef CSQC
-void HUD_Mod_FreezeTag(vector myPos, vector mySize);
-void HUD_Mod_FreezeTag_Export(int fh);
-#endif
+//#ifdef CSQC
+//void HUD_Mod_FreezeTag(vector myPos, vector mySize);
+//void HUD_Mod_FreezeTag_Export(int fh);
+//#endif
CLASS(FreezeTag, Gametype)
INIT(FreezeTag)
{
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_FreezeTag);
- ATTRIB(FreezeTag, m_modicons_export, void(int fh), HUD_Mod_FreezeTag_Export);
+ //ATTRIB(FreezeTag, m_modicons, void(vector pos, vector mySize), HUD_Mod_FreezeTag);
+ //ATTRIB(FreezeTag, m_modicons_export, void(int fh), HUD_Mod_FreezeTag_Export);
+ ATTRIB(FreezeTag, m_modscores, int(int team), HUD_Scores_CA);
#endif
ATTRIB(FreezeTag, m_legacydefaults, string, "10 20 0");
ENDCLASS(FreezeTag)
/** game type priority in random selections */
ATTRIB(Gametype, m_priority, int, 0);
#ifdef CSQC
- ATTRIB(Gametype, m_modicons, void(vector pos, vector mySize));
- ATTRIB(Gametype, m_modicons_reset, void());
- ATTRIB(Gametype, m_modicons_export, void(int fh));
+ //ATTRIB(Gametype, m_modicons, void(vector pos, vector mySize));
+ //ATTRIB(Gametype, m_modicons_reset, void());
+ //ATTRIB(Gametype, m_modicons_export, void(int fh));
+ ATTRIB(Gametype, m_modscores, int(int team));
#endif
/** DO NOT USE, this is compatibility for legacy maps! */