seta hud_weaponicons 1 "enable/disable this panel"
seta hud_weaponicons_pos "0.930000 0.090000" "position of this panel"
seta hud_weaponicons_size "0.040000 0.490000" "size of this panel"
-seta hud_weaponicons_complainbubble 1 "complain bubble (out of ammo, weapon not available etc)"
-seta hud_weaponicons_complainbubble_padding -10 "padding for the complainbubble"
-seta hud_weaponicons_ammo_color "0 1 0" "color of status bar"
-seta hud_weaponicons_ammo_alpha 1 "alpha of status bar"
seta hud_weaponicons_bg "border_weaponicons" "if set to something else than \"\" = override default background"
seta hud_weaponicons_bg_color "" "if set to something else than \"\" = override default panel background color"
seta hud_weaponicons_bg_color_team "" "override panel color with team color in team based games"
seta hud_weaponicons_bg_alpha "" "if set to something else than \"\" = override default panel background alpha"
seta hud_weaponicons_bg_border "" "if set to something else than \"\" = override default size of border around the background"
seta hud_weaponicons_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
+seta hud_weaponicons_aspect 2 "use this aspect on the items"
+seta hud_weaponicons_complainbubble 1 "complain bubble (out of ammo, weapon not available etc)"
+seta hud_weaponicons_complainbubble_padding -10 "padding for the complainbubble"
+seta hud_weaponicons_ammo_color "0 1 0" "color of status bar"
+seta hud_weaponicons_ammo_alpha 1 "alpha of status bar"
seta hud_inventory 1 "enable/disable this panel"
seta hud_inventory_pos "0.190000 0.930000" "position of this panel"
fputs(fh, strcat("seta hud_", panel_name, "_complainbubble_padding \"", cvar_string(strcat("hud_", panel_name, "_complainbubble_padding")), "\"", "\n"));
fputs(fh, strcat("seta hud_", panel_name, "_ammo_color \"", cvar_string(strcat("hud_", panel_name, "_ammo_color")), "\"", "\n"));
fputs(fh, strcat("seta hud_", panel_name, "_ammo_alpha \"", cvar_string(strcat("hud_", panel_name, "_ammo_alpha")), "\"", "\n"));
+ fputs(fh, strcat("seta hud_", panel_name, "_aspect \"", cvar_string(strcat("hud_", panel_name, "_ammo_alpha")), "\"", "\n"));
break;
case HUD_PANEL_INVENTORY:
fputs(fh, strcat("seta hud_", panel_name, "_onlycurrent \"", cvar_string(strcat("hud_", panel_name, "_onlycurrent")), "\"", "\n"));
case HUD_PANEL_VOTE:
fputs(fh, strcat("seta hud_", panel_name, "_alreadyvoted_alpha \"", cvar_string(strcat("hud_", panel_name, "_alreadyvoted_alpha")), "\"", "\n"));
break;
+ case HUD_PANEL_PRESSEDKEYS:
+ fputs(fh, strcat("seta hud_", panel_name, "_aspect \"", cvar_string(strcat("hud_", panel_name, "_aspect")), "\"", "\n"));
+ break;
}
fputs(fh, "\n");
}
float rows, columns;
rows = mySize_y/mySize_x;
- rows = bound(1, floor((sqrt(4 * (2/1) * rows * WEP_COUNT + rows * rows) + rows + 0.5) / 2), WEP_COUNT);
- // ^^^ weapon icon aspect goes here
+ rows = bound(1, floor((sqrt(4 * autocvar_hud_weaponicons_aspect * rows * WEP_COUNT + rows * rows) + rows + 0.5) / 2), WEP_COUNT);
columns = ceil(WEP_COUNT/rows);
float row, column;
vector barsize;
vector barpos;
- if(wpnsize_x/wpnsize_y > 2)
+ if(wpnsize_x/wpnsize_y > autocvar_hud_weaponicons_aspect)
{
- barsize_x = 2 * wpnsize_y;
+ barsize_x = autocvar_hud_weaponicons_aspect * wpnsize_y;
barsize_y = wpnsize_y;
barpos_x = wpnpos_x + (wpnsize_x - barsize_x) / 2;
}
else
{
- barsize_y = 1/2 * wpnsize_x;
+ barsize_y = 1/autocvar_hud_weaponicons_aspect * wpnsize_x;
barsize_x = wpnsize_x;
barpos_y = wpnpos_y + (wpnsize_y - barsize_y) / 2;
barpos_x,
barpos_y,
barsize_x * bound(0, a/fullammo, 1),
- barsize_y); // use 2x more full ammo for uzi
+ barsize_y);
drawpic_aspect_skin(wpnpos, "weapon_ammo", wpnsize, autocvar_hud_weaponicons_ammo_color, panel_fg_alpha * autocvar_hud_weaponicons_ammo_alpha, DRAWFLAG_NORMAL);
drawresetcliparea();
}