diff options
author | rubidium <rubidium@openttd.org> | 2010-09-09 14:40:39 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-09-09 14:40:39 +0000 |
commit | 7f8b490a21b22418e6a1e1450a6e6e635e79086a (patch) | |
tree | be2d798e85fcfd2f84df74fe8de166bc8ba98cfe /src/vehicle_gui_base.h | |
parent | 3ebf8a297e6320d3cdf771fdf7393c1fb1e79fc9 (diff) | |
download | openttd-7f8b490a21b22418e6a1e1450a6e6e635e79086a.tar.xz |
(svn r20777) -Codechange: make VehicleListIdentifier a variable of BaseVehicleList and use that instead of "dereferencing" the window number and storing some information twice
Diffstat (limited to 'src/vehicle_gui_base.h')
-rw-r--r-- | src/vehicle_gui_base.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vehicle_gui_base.h b/src/vehicle_gui_base.h index 6f7e4004f..e4f6ccc76 100644 --- a/src/vehicle_gui_base.h +++ b/src/vehicle_gui_base.h @@ -22,9 +22,9 @@ typedef GUIList<const Vehicle*> GUIVehicleList; struct BaseVehicleListWindow : public Window { GUIVehicleList vehicles; ///< The list of vehicles Listing *sorting; ///< Pointer to the vehicle type related sorting. - VehicleType vehicle_type; ///< The vehicle type that is sorted byte unitnumber_digits; ///< The number of digits of the highest unit number Scrollbar *vscroll; + VehicleListIdentifier vli; ///< Identifier of the vehicle list we want to currently show. enum ActionDropdownItem { ADI_REPLACE, @@ -38,14 +38,14 @@ struct BaseVehicleListWindow : public Window { static const StringID vehicle_sorter_names[]; static GUIVehicleList::SortFunction * const vehicle_sorter_funcs[]; - BaseVehicleListWindow() : Window() + BaseVehicleListWindow(WindowNumber wno) : Window(), vli(wno) { this->vehicles.SetSortFuncs(this->vehicle_sorter_funcs); } void DrawVehicleListItems(VehicleID selected_vehicle, int line_height, const Rect &r) const; void SortVehicleList(); - void BuildVehicleList(const VehicleListIdentifier &identifier); + void BuildVehicleList(); Dimension GetActionDropdownSize(bool show_autoreplace, bool show_group); DropDownList *BuildActionDropdownList(bool show_autoreplace, bool show_group); }; |