50 item.colormod =
color;
51 item.count = currentTime;
52 item.lifetime = lifeTime;
53 item.cnt = isInfinite;
60 TC(
int, align);
TC(
int, column);
TC(
int, row);
TC(
int, columns);
TC(
int, rows);
TC(
bool, isVertical);
64 bool isTop = isVertical && rows > 1 && row == 0;
65 bool isBottom = isVertical && rows > 1 && row == rows - 1;
66 bool isLeft = !isVertical && columns > 1 && column == 0;
67 bool isRight = !isVertical && columns > 1 && column == columns - 1;
69 if (isTop || isLeft)
return (align == 2) ? 1 : 0;
70 if (isBottom || isRight)
return (align == 2) ? 0 : 1;
115 const float DESIRED_ASPECT = 6;
129 if (i == 1 ||
fabs(DESIRED_ASPECT - a) <
fabs(DESIRED_ASPECT - aspect))
144 pos.y +=
size.y * 0.5;
149 pos.x +=
size.x * 0.5;
156 vector textColor =
'1 1 1';
166 itemPos =
vec2(pos.x + column * itemSize.x, pos.y + row * itemSize.y);
179 fullSeconds =
ceil(item.count);
180 textColor =
'0.6 0.6 0.6' + (item.colormod * 0.4);
189 DrawNumIcon_expanding(itemPos, itemSize, fullSeconds, item.netname, isVertical,
false, align, textColor,
panel_fg_alpha,
bound(0, (fullSeconds - item.count) * 2, 1));
196 if (++column >= columns)
#define MUTATOR_CALLHOOK(id,...)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define draw_beginBoldFont()
#define draw_endBoldFont()
void addPowerupItem(string name, string icon, vector color, float currentTime, float lifeTime, bool isInfinite)
int getPowerupItemAlign(int align, int column, int row, int columns, int rows, bool isVertical)
void HUD_Powerups_Export(int fh)
bool autocvar_hud_panel_powerups_dynamichud
bool autocvar_hud_panel_powerups_text
int autocvar_hud_panel_powerups_baralign
bool autocvar_hud_panel_powerups_hide_ondeath
int autocvar_hud_panel_powerups_iconalign
bool autocvar_hud_panel_powerups_progressbar
bool autocvar_hud_panel_powerups
int spectatee_status
the -1 disables HUD panels before CSQC receives necessary data
const float DRAWFLAG_NORMAL
void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag)
void HUD_Panel_LoadCvars()
void DrawNumIcon(vector myPos, vector mySize, float theTime, string icon, bool vertical, bool isInfinite, int icon_right_align, vector color, float theAlpha)
void DrawNumIcon_expanding(vector myPos, vector mySize, float theTime, string icon, bool vertical, bool isInfinite, int icon_right_align, vector color, float theAlpha, float fadelerp)
float autocvar_hud_progressbar_alpha
#define HUD_Panel_DrawBg()
#define HUD_Write_Cvar(cvar)
bool autocvar__hud_configure