summaryrefslogtreecommitdiff
path: root/src/vehicle_gui.h
diff options
context:
space:
mode:
authorskidd13 <skidd13@openttd.org>2008-06-19 19:58:30 +0000
committerskidd13 <skidd13@openttd.org>2008-06-19 19:58:30 +0000
commit32c2041f891b451d66a72871986871c46b6f8263 (patch)
tree37921dafcbd80aaa6a3e71f4199e0ed81ee3c89e /src/vehicle_gui.h
parent4cc9439d6541d1c2e0e6f40eb9e59b26826bd145 (diff)
downloadopenttd-32c2041f891b451d66a72871986871c46b6f8263.tar.xz
(svn r13587) -Codechange: make some globals members of VehicleListBase since they are used as such
-Cleanup: some small things referring the change
Diffstat (limited to 'src/vehicle_gui.h')
-rw-r--r--src/vehicle_gui.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/vehicle_gui.h b/src/vehicle_gui.h
index aea010a84..43a99c919 100644
--- a/src/vehicle_gui.h
+++ b/src/vehicle_gui.h
@@ -15,10 +15,6 @@
void DrawVehicleProfitButton(const Vehicle *v, int x, int y);
void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order);
-#define PERIODIC_RESORT_DAYS 10
-
-extern const StringID _vehicle_sort_listing[];
-
/** Constants of vehicle view widget indices */
enum VehicleViewWindowWidgets {
VVW_WIDGET_CLOSEBOX = 0,
@@ -121,6 +117,14 @@ struct VehicleListBase {
GUIVehicleList vehicles; ///< The list of vehicles
Listing *sorting; ///< Pointer to the vehicle type related sorting.
VehicleType vehicle_type; ///< The vehicle type that is sorted
+
+ static const StringID vehicle_sorter_names[];
+ static GUIVehicleList::SortFunction *const vehicle_sorter_funcs[];
+
+ VehicleListBase()
+ {
+ this->vehicles.SetSortFuncs(this->vehicle_sorter_funcs);
+ }
};
struct Sorting {