weapon_size_y = old_panel_size_y / rows;
// change table values to include only the owned weapons
- // weapon_size won't be changed
+ float columns_save = columns;
if(weapon_count <= rows)
{
rows = weapon_count;
else
columns = ceil(weapon_count / rows);
+ // enlarge weapon_size to match desired aspect ratio in order to capitalize on panel space
+ if(columns < columns_save)
+ weapon_size_x = min(old_panel_size_x / columns, aspect * weapon_size_y);
+
// reduce size of the panel
panel_size_x = columns * weapon_size_x;
panel_size_y = rows * weapon_size_y;
{
if (autocvar_hud_panel_radar == 0) return;
if (autocvar_hud_panel_radar != 2 && !teamplay) return;
+ if(radar_panel_modified)
+ {
+ panel.update_time = time; // forces reload of panel attributes
+ radar_panel_modified = false;
+ }
}
}
panel_bg = strcat(hud_skin_path, "/border_default"); // always use the default border when maximized
if(precache_pic(panel_bg) == "")
panel_bg = "gfx/hud/default/border_default"; // fallback
+ if(!radar_panel_modified && panel_bg != panel.current_panel_bg)
+ radar_panel_modified = true;
if(panel.current_panel_bg)
strunzone(panel.current_panel_bg);
panel.current_panel_bg = strzone(panel_bg);
return;
}
if(autocvar__con_chat_maximized)
+ {
if(!hud_draw_maximized) return;
+ }
+ else if(chat_panel_modified)
+ {
+ panel.update_time = time; // forces reload of panel attributes
+ chat_panel_modified = false;
+ }
}
HUD_Panel_UpdateCvars();
if(panel.current_panel_bg)
strunzone(panel.current_panel_bg);
panel.current_panel_bg = strzone(panel_bg);
+ chat_panel_modified = true;
}
panel_bg_alpha = max(0.75, panel_bg_alpha); // force an theAlpha of at least 0.75
}