#ifdef CSQC
+// ItemsTime (#22)
+
+void HUD_ItemsTime_Export(entity panel, int fh)
+{
+ // allow saving cvars that aesthetically change the panel into hud skin files
+ HUD_Write_Cvar("hud_panel_itemstime_iconalign");
+ HUD_Write_Cvar("hud_panel_itemstime_progressbar");
+ HUD_Write_Cvar("hud_panel_itemstime_progressbar_name");
+ HUD_Write_Cvar("hud_panel_itemstime_progressbar_reduced");
+ HUD_Write_Cvar("hud_panel_itemstime_text");
+ HUD_Write_Cvar("hud_panel_itemstime_ratio");
+ HUD_Write_Cvar("hud_panel_itemstime_dynamicsize");
+}
+
void DrawItemsTimeItem(vector myPos, vector mySize, float ar, string item_icon, float item_time, bool item_available, float item_availableTime)
{
float t = 0;
if (autocvar_hud_panel_itemstime_hidespawned == 2)
picalpha = 1;
else if (item_available)
- {
- float BLINK_FACTOR = 0.15;
- float BLINK_BASE = 0.85;
- float BLINK_FREQ = 5;
- picalpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ);
- }
+ picalpha = blink(0.85, 0.15, 5);
else
picalpha = 0.5;
t = floor(item_time - time + 0.999);