seta hud_panel_centerprint_fade_minfontsize "0"
seta hud_panel_itemstime 1
-seta hud_panel_itemstime_pos "0.020000 0.500000"
-seta hud_panel_itemstime_size "0.150000 0.120000"
-seta hud_panel_itemstime_bg ""
+seta hud_panel_itemstime_pos "0.020000 0.490000"
+seta hud_panel_itemstime_size "0.150000 0.140000"
+seta hud_panel_itemstime_bg "0"
seta hud_panel_itemstime_bg_color ""
seta hud_panel_itemstime_bg_color_team ""
seta hud_panel_itemstime_bg_alpha ""
seta hud_panel_itemstime_bg_border ""
seta hud_panel_itemstime_bg_padding ""
seta hud_panel_itemstime_iconalign "0"
-seta hud_panel_itemstime_progressbar "0"
+seta hud_panel_itemstime_progressbar "1"
seta hud_panel_itemstime_progressbar_name "progressbar"
-seta hud_panel_itemstime_progressbar_reduced "0"
+seta hud_panel_itemstime_progressbar_reduced "1"
seta hud_panel_itemstime_showspawned "0"
seta hud_panel_itemstime_text "1"
+seta hud_panel_itemstime_ratio "3.5"
menu_sync
}
}
-void DrawItemsTimeItem(vector myPos, vector mySize, float itemcode)
+void DrawItemsTimeItem(vector myPos, vector mySize, float ar, float itemcode)
{
float t;
vector color;
if(autocvar_hud_panel_itemstime_iconalign)
{
numpos = myPos;
- picpos = myPos + eX * 2 * mySize_y;
+ picpos = myPos + eX * (ar - 1) * mySize_y;
}
else
{
if(autocvar_hud_panel_itemstime_progressbar_reduced)
{
p_pos = numpos;
- p_size = eX * (2/3) * mySize_x + eY * mySize_y;
+ p_size = eX * ((ar - 1)/ar) * mySize_x + eY * mySize_y;
}
else
{
}
if(t > 0 && autocvar_hud_panel_itemstime_text)
- drawstring_aspect(numpos, ftos(t), eX * (2/3) * mySize_x + eY * mySize_y, color, panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(numpos, ftos(t), eX * ((ar - 1)/ar) * mySize_x + eY * mySize_y, color, panel_fg_alpha, DRAWFLAG_NORMAL);
drawpic_aspect_skin(picpos, GetItemsTimePicture(itemcode), '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha * picalpha, DRAWFLAG_NORMAL);
}
}
float rows, columns, row, column;
- const float ASPECT_RATIO = 3;
+ float ar = max(2, autocvar_hud_panel_itemstime_ratio) + 1;
rows = mySize_y/mySize_x;
- rows = bound(1, floor((sqrt(4 * ASPECT_RATIO * rows * count + rows * rows) + rows + 0.5) / 2), count);
+ rows = bound(1, floor((sqrt(4 * ar * rows * count + rows * rows) + rows + 0.5) / 2), count);
columns = ceil(count/rows);
local noref vector offset; // fteqcc sucks
float newSize;
- if(itemstime_size_x/itemstime_size_y > ASPECT_RATIO)
+ if(itemstime_size_x/itemstime_size_y > ar)
{
- newSize = ASPECT_RATIO * itemstime_size_y;
+ newSize = ar * itemstime_size_y;
offset_x = itemstime_size_x - newSize;
pos_x += offset_x/2;
itemstime_size_x = newSize;
}
else
{
- newSize = 1/ASPECT_RATIO * itemstime_size_x;
+ newSize = 1/ar * itemstime_size_x;
offset_y = itemstime_size_y - newSize;
pos_y += offset_y/2;
itemstime_size_y = newSize;
if (!autocvar_hud_panel_itemstime_showspawned)
if (ItemsTime_time[i] <= time)
continue;
- DrawItemsTimeItem(pos + eX * column * (itemstime_size_x + offset_x) + eY * row * (itemstime_size_y + offset_y), itemstime_size, i);
+ DrawItemsTimeItem(pos + eX * column * (itemstime_size_x + offset_x) + eY * row * (itemstime_size_y + offset_y), itemstime_size, ar, i);
++row;
if(row >= rows)
{