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;
106 bool isVertical = size.y > size.x;
115 const float DESIRED_ASPECT = 6;
125 a = isVertical ? (size.y/r) / (size.x/c) : (size.x/c) / (size.y/r);
127 if(i == 1 ||
fabs(DESIRED_ASPECT - a) <
fabs(DESIRED_ASPECT - aspect))
142 pos.y += size.y * 0.5;
147 pos.x += size.x * 0.5;
153 vector itemSize =
vec2(size.x / columns, size.y / rows);
154 vector textColor =
'1 1 1';
164 itemPos =
vec2(pos.x + column * itemSize.x, pos.y + row * itemSize.y);
177 fullSeconds =
ceil(item.count);
178 textColor =
'0.6 0.6 0.6' + (item.colormod * 0.4);
187 DrawNumIcon_expanding(itemPos, itemSize, fullSeconds, item.netname, isVertical,
false, align, textColor,
panel_fg_alpha,
bound(0, (fullSeconds - item.count) / 0.5, 1));
194 if(++column >= columns)
bool autocvar_hud_panel_powerups
#define draw_endBoldFont()
int autocvar_hud_panel_powerups_baralign
void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag)
bool autocvar__hud_configure
#define draw_beginBoldFont()
void HUD_Powerups_Export(int fh)
bool autocvar_hud_panel_powerups_hide_ondeath
int autocvar_hud_panel_powerups_iconalign
void DrawNumIcon(vector myPos, vector mySize, float theTime, string icon, bool vertical, bool isInfinite, int icon_right_align, vector color, float theAlpha)
bool autocvar_hud_panel_powerups_progressbar
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)
#define HUD_Panel_DrawBg()
bool autocvar_hud_panel_powerups_text
const float DRAWFLAG_NORMAL
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)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
bool autocvar_hud_panel_powerups_dynamichud
#define MUTATOR_CALLHOOK(id,...)
float autocvar_hud_progressbar_alpha
#define HUD_Write_Cvar(cvar)
void HUD_Panel_LoadCvars()