17 else if(timeleft <= 300)
27 time_elapsed =
max(0, time_elapsed);
28 return floor(time_elapsed);
33 float timeleft = timelimit + starttime - curtime;
35 timeleft =
bound(0, timeleft, timelimit);
36 return ceil(timeleft);
67 float curtime, timelimit, timeleft;
68 vector timer_size, subtext_size, subtimer_size;
69 vector timer_color =
'1 1 1';
70 vector subtimer_color =
'1 1 1';
77 timelimit = STAT(WARMUP_TIMELIMIT);
79 timelimit = STAT(TIMELIMIT) * 60;
83 timelimit = STAT(TIMELIMIT) * 60;
102 if(STAT(ROUNDSTARTTIME) == -1) {
105 subtimer_color =
'1 0 0';
111 round_timelimit = STAT(ROUND_TIMELIMIT);
114 round_timeleft =
HUD_Timer_TimeLeft(round_curtime, STAT(ROUNDSTARTTIME), round_timelimit);
129 int overtimes = STAT(OVERTIMES);
132 subtext = _(
"Warmup");
133 else if(STAT(TIMEOUT_STATUS) == 2)
134 subtext = _(
"Timeout");
135 else if (overtimes == -1)
136 subtext = _(
"Sudden Death");
137 else if(overtimes == 1)
138 subtext = _(
"Overtime");
139 else if (overtimes >= 2)
140 subtext = sprintf(_(
"Overtime #%d"), overtimes);
142 subtext_size =
vec2(mySize.x, mySize.y / 3);
143 timer_size =
vec2(mySize.x, mySize.y - subtext_size.y);
144 subtimer_size =
vec2(mySize.x / 3, mySize.y - subtext_size.y);
150 float subtimer_padding = subtimer_size.y / 5;
151 timer_size.x -= subtimer_size.x;
vector HUD_Timer_Color(float timeleft)
#define draw_endBoldFont()
int autocvar_hud_panel_timer_secondary
void drawstring_aspect(vector pos, string text, vector sz, vector color, float theAlpha, float drawflag)
bool autocvar__hud_configure
#define draw_beginBoldFont()
float HUD_Timer_TimeElapsed(float curtime, float starttime)
#define HUD_Panel_DrawBg()
bool autocvar_hud_panel_timer_dynamichud
float HUD_Timer_TimeLeft(float curtime, float starttime, float timelimit)
void HUD_Timer_Export(int fh)
const float DRAWFLAG_NORMAL
vector(float skel, float bonenum) _skel_get_boneabs_hidden
bool autocvar_hud_panel_timer
bool autocvar_hud_panel_timer_increment
bool autocvar_hud_panel_timer_unbound
void HUD_Panel_LoadCvars()
ERASEABLE string seconds_tostring(float seconds)