Only show template replacement menu item where sensible.

Fix drop-down not being sized for template replacement item to fit.
This commit is contained in:
Jonathan G Rennison
2016-02-14 02:55:55 +00:00
parent 1ebd0af2c6
commit faa72e9615
3 changed files with 18 additions and 10 deletions

View File

@@ -47,8 +47,8 @@ struct BaseVehicleListWindow : public Window {
void DrawVehicleListItems(VehicleID selected_vehicle, int line_height, const Rect &r) const;
void SortVehicleList();
void BuildVehicleList();
Dimension GetActionDropdownSize(bool show_autoreplace, bool show_group);
DropDownList *BuildActionDropdownList(bool show_autoreplace, bool show_group);
Dimension GetActionDropdownSize(bool show_autoreplace, bool show_group, bool show_template_replace);
DropDownList *BuildActionDropdownList(bool show_autoreplace, bool show_group, bool show_template_replace);
};
uint GetVehicleListHeight(VehicleType type, uint divisor = 1);