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 ==
"")
258 float current_msg_posY = 0;
259 bool all_messages_expired =
true;
270 float width = 0, right_width = 0, left_width = 0, max_rl_width = 0;
282 vector duel_title_pos =
'0 0 0';
283 float padding =
stringwidth(
" ",
false, fontsize) * 2;
286 if (left_width > right_width)
287 max_rl_width = left_width;
289 max_rl_width = right_width;
291 width = max_rl_width * 2 + padding * 6 +
stringwidth(_(
"vs"),
false, fontsize);
293 duel_title_pos = pos;
296 if (left_width < right_width)
297 pos.x += (max_rl_width - left_width) * 0.5;
300 pos.x = duel_title_pos.x + max_rl_width + padding * 3;
303 pos.x = duel_title_pos.x + width - padding - max_rl_width;
304 if (left_width >= right_width)
305 pos.x += (max_rl_width - right_width) * 0.5;
321 pos.x = duel_title_pos.x;
333 all_messages_expired =
false;
360 all_messages_expired =
false;
382 else if (fade_out_time)
414 for (k = 0; k < n; ++k)
429 current_msg_posY = pos.y;
432 float msg_size = pos.y;
433 for (k = 0; k < n; ++k)
464 msg_size = pos.y - msg_size;
470 pos.y += (1 -
sqrt(a));
482 pos.y -= (1 -
sqrt(a));
493 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]
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)