47 offset = sz.x - stringwidth_colors(s, fontsize) - offset;
52 pos.y += fontsize.y * 0.25;
56 #define InfoMessage(s) MACRO_BEGIN \ 57 pos = InfoMessages_drawstring(s, pos, mySize, ((img_curr_group >= 0) ? panel_fg_alpha * img_fade[img_curr_group] : panel_fg_alpha), fontsize); \ 58 img_curr_group = -1; \ 84 vector fontsize =
'0.2 0.2 0' * mySize.y;
86 int img_curr_group = -1;
94 s = sprintf(_(
"^1Spectating: ^7%s"), entcs_GetName(
current_player));
105 s = sprintf(_(
"^1Press ^3%s^1 to spectate"),
getcommandkey(_(
"primary fire"),
"+fire"));
107 s = sprintf(_(
"^1Press ^3%s^1 or ^3%s^1 for next or previous player"),
getcommandkey(_(
"next weapon"),
"weapnext"),
getcommandkey(_(
"previous weapon"),
"weapprev"));
111 s = sprintf(_(
"^1Use ^3%s^1 or ^3%s^1 to change the speed"),
getcommandkey(_(
"next weapon"),
"weapnext"),
getcommandkey(_(
"previous weapon"),
"weapprev"));
113 s = sprintf(_(
"^1Press ^3%s^1 to observe, ^3%s^1 to change camera mode"),
getcommandkey(_(
"secondary fire"),
"+fire2"),
getcommandkey(_(
"drop weapon"),
"dropweapon"));
116 s = sprintf(_(
"^1Press ^3%s^1 for gamemode info"),
getcommandkey(_(
"server info"),
"+show_info"));
122 bool mutator_returnvalue =
MUTATOR_CALLHOOK(DrawInfoMessages, pos, mySize, img_curr_group);
124 img_curr_group =
M_ARGV(2,
int);
126 if(!mutator_returnvalue)
128 s = sprintf(_(
"^1Press ^3%s^1 to join"),
getcommandkey(_(
"jump"),
"+jump"));
133 if (
time < STAT(GAMESTARTTIME))
136 float countdown =
ceil(STAT(GAMESTARTTIME) -
time);
137 s = sprintf(_(
"^1Game starts in ^3%d^1 seconds"), countdown);
143 s = _(
"^2Currently in ^1warmup^2 stage!");
158 s = sprintf(_(
"%sPress ^3%s%s to end warmup"), blinkcolor,
getcommandkey(_(
"ready"),
"ready"), blinkcolor);
160 s = sprintf(_(
"%sPress ^3%s%s once you are ready"), blinkcolor,
getcommandkey(_(
"ready"),
"ready"), blinkcolor);
165 s = _(
"^2Waiting for others to ready up to end warmup...");
167 s = _(
"^2Waiting for others to ready up...");
173 s = sprintf(_(
"^2Press ^3%s^2 to end warmup"),
getcommandkey(_(
"ready"),
"ready"));
179 float ts_min = 0, ts_max = 0;
183 for (; tm.sort_next; tm = tm.sort_next)
187 if(!ts_min) ts_min = tm.team_size;
188 else ts_min =
min(ts_min, tm.team_size);
189 if(!ts_max) ts_max = tm.team_size;
190 else ts_max =
max(ts_max, tm.team_size);
192 if ((ts_max - ts_min) > 1)
194 s =
strcat(blinkcolor, _(
"Teamnumbers are unbalanced!"));
196 if (tm && tm.team !=
NUM_SPECTATOR && tm.team_size == ts_max)
197 s =
strcat(s, sprintf(_(
" Press ^3%s%s to adjust"),
getcommandkey(_(
"team menu"),
"menu_showteamselect"), blinkcolor));
207 s = ((
spectatee_status) ? _(
"^1Spectating this player:") : _(
"^1Spectating you:"));
210 for(
int i = 0; i < limit; ++i)
214 s =
strcat(s,
" ^7", entcs_GetName(slot));
216 s =
strcat(
"^7", entcs_GetName(slot));
223 InfoMessage(_(
"^7Press ^3ESC ^7to show HUD options."));
224 InfoMessage(_(
"^3Doubleclick ^7a panel for panel-specific options."));
225 InfoMessage(_(
"^3CTRL ^7to disable collision testing, ^3SHIFT ^7and"));
226 InfoMessage(_(
"^3ALT ^7+ ^3ARROW KEYS ^7for fine adjustments."));
float autocvar_hud_panel_infomessages_group0
string getWrappedLine_remaining
bool autocvar__hud_configure
float autocvar_hud_panel_infomessages_group_fadetime
#define getcommandkey(cmd_name, command)
bool autocvar_cl_showspectators
bool autocvar_hud_panel_infomessages
vector InfoMessages_drawstring(string s, vector pos, vector sz, float a, vector fontsize)
#define HUD_Panel_DrawBg()
int img_cur_msg[IMG_COUNT]
bool ready_waiting_for_me
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
bool autocvar_hud_panel_infomessages_flip
float img_time[IMG_COUNT]
const float DRAWFLAG_NORMAL
vector(float skel, float bonenum) _skel_get_boneabs_hidden
int img_select(int group_id)
float autocvar_hud_panel_infomessages_group_time
bool autocvar_hud_panel_infomessages_dynamichud
float img_fade[IMG_COUNT]
#define MUTATOR_CALLHOOK(id,...)
void HUD_InfoMessages_Export(int fh)
string getWrappedLine(float w, vector theFontSize, textLengthUpToWidth_widthFunction_t tw)
#define HUD_Write_Cvar(cvar)
int spectatorlist[MAX_SPECTATORS]
entity GetTeam(int Team, bool add)
void HUD_Panel_LoadCvars()