21 HUD_Write_Cvar(
"hud_panel_centerprint_fade_subsequent_passone_minalpha");
23 HUD_Write_Cvar(
"hud_panel_centerprint_fade_subsequent_passtwo_minalpha");
24 HUD_Write_Cvar(
"hud_panel_centerprint_fade_subsequent_minfontsize");
52void centerprint_Add(
int new_id,
string strMessage,
float duration,
int countdown_num)
54 TC(
int, new_id);
TC(
int, countdown_num);
57 if (strMessage ==
"" && new_id == 0)
61 int j =
strlen(strMessage) - 1;
62 while (
substring(strMessage, j, 1) ==
"\n" && j >= 0)
64 if (j <
strlen(strMessage) - 1)
65 strMessage =
substring(strMessage, 0, j + 1);
67 if (strMessage ==
"" && new_id == 0)
77 if (strMessage ==
"" && new_id == 0)
102 if (strMessage ==
"")
260 float current_msg_posY = 0;
261 bool all_messages_expired =
true;
272 float width = 0, right_width = 0, left_width = 0, max_rl_width = 0;
284 vector duel_title_pos =
'0 0 0';
285 float padding =
stringwidth(
" ",
false, fontsize) * 2;
288 if (left_width > right_width)
289 max_rl_width = left_width;
291 max_rl_width = right_width;
293 width = max_rl_width * 2 + padding * 6 +
stringwidth(_(
"vs"),
false, fontsize);
295 duel_title_pos = pos;
298 if (left_width < right_width)
299 pos.x += (max_rl_width - left_width) * 0.5;
302 pos.x = duel_title_pos.x + max_rl_width + padding * 3;
305 pos.x = duel_title_pos.x + width - padding - max_rl_width;
306 if (left_width >= right_width)
307 pos.x += (max_rl_width - right_width) * 0.5;
323 pos.x = duel_title_pos.x;
335 all_messages_expired =
false;
362 all_messages_expired =
false;
384 else if (fade_out_time)
416 for (k = 0; k < n; ++k)
431 current_msg_posY = pos.y;
434 float msg_size = pos.y;
435 for (k = 0; k < n; ++k)
466 msg_size = pos.y - msg_size;
472 pos.y += (1 -
sqrt(a));
484 pos.y -= (1 -
sqrt(a));
495 if (all_messages_expired)
int centerprint_msgID[CENTERPRINT_MAX_MSGS]
void centerprint_KillAll()
const float CENTERPRINT_BASE_SIZE
void HUD_CenterPrint_Export(int fh)
void centerprint_ClearTitle()
const int CENTERPRINT_MAX_ENTRIES
const int CENTERPRINT_MAX_MSGS
string centerprint_title_left
string centerprint_title_right
float hud_configure_cp_generation_time
void centerprint_Add(int new_id, string strMessage, float duration, int countdown_num)
string centerprint_messages[CENTERPRINT_MAX_MSGS]
void centerprint_SetTitle(string title)
const float CENTERPRINT_TITLE_SPACING
void centerprint_SetDuelTitle(string left, string right)
int centerprint_countdown_num[CENTERPRINT_MAX_MSGS]
void HUD_CenterPrint(bool should_draw)
const float CENTERPRINT_SPACING
float centerprint_time[CENTERPRINT_MAX_MSGS]
float centerprint_expire_time[CENTERPRINT_MAX_MSGS]
void centerprint_Kill(int id)
void centerprint_AddStandard(string strMessage)
float centerprint_start_time[CENTERPRINT_MAX_MSGS]
float autocvar_hud_panel_centerprint_align
bool autocvar_hud_panel_centerprint_flip
float autocvar_hud_panel_centerprint_fade_subsequent
float autocvar_hud_panel_centerprint_fade_out
float autocvar_hud_panel_centerprint_fade_subsequent_passone
float autocvar_hud_panel_centerprint_fade_subsequent_passtwo
bool autocvar_hud_panel_centerprint
float autocvar_hud_panel_centerprint_fontscale_bold
float autocvar_hud_panel_centerprint_fade_minfontsize
float autocvar_hud_panel_centerprint_fontscale_title
float autocvar_hud_panel_centerprint_fade_subsequent_passone_minalpha
float autocvar_hud_panel_centerprint_time
bool autocvar_hud_panel_centerprint_dynamichud
float autocvar_hud_panel_centerprint_fontscale
float autocvar_hud_panel_centerprint_fade_in
float autocvar_hud_panel_centerprint_fade_subsequent_passtwo_minalpha
#define drawcolorcodedstring(position, text, scale, alpha, flag)
#define drawstring(position, text, scale, rgb, alpha, flag)
#define draw_beginBoldFont()
#define drawfill(position, size, rgb, alpha, flag)
#define draw_endBoldFont()
string textShortenToWidth(string theText, float maxWidth, vector theFontSize, textLengthUpToWidth_widthFunction_t tw)
string getWrappedLine(float maxWidth, vector theFontSize, textLengthUpToWidth_widthFunction_t tw)
string getWrappedLine_remaining
const float DRAWFLAG_NORMAL
#define tokenizebyseparator
void HUD_Panel_LoadCvars()
float hud_panel_radar_bottom
#define HUD_Panel_DrawBg()
bool HUD_Radar_Clickable()
#define HUD_Write_Cvar(cvar)
bool autocvar__hud_configure
noref float vid_conheight
float scoreboard_fade_alpha
float autocvar_hud_panel_scoreboard_namesize
ERASEABLE string seconds_tostring(float seconds)
string CCR(string input)
color code replace, place inside of sprintf and parse the string
float stringwidth_colors(string s, vector theSize)