summaryrefslogtreecommitdiff
path: root/src/vehicle_gui.h
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2012-12-20 19:44:02 +0000
committermichi_cc <michi_cc@openttd.org>2012-12-20 19:44:02 +0000
commitc75962e04c0999c0c458b2ee54519f094d7c6543 (patch)
tree77dfc5b80771380cba34acf3f6ed564ce8be0657 /src/vehicle_gui.h
parent8eb1cb4ebbfa2b00ca27f860555f5397fe5a1c9e (diff)
downloadopenttd-c75962e04c0999c0c458b2ee54519f094d7c6543.tar.xz
(svn r24833) -Codechange: Replace magic numbers for invalidating vehicle-related windows with an enum.
Diffstat (limited to 'src/vehicle_gui.h')
-rw-r--r--src/vehicle_gui.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vehicle_gui.h b/src/vehicle_gui.h
index 846a86490..99155464b 100644
--- a/src/vehicle_gui.h
+++ b/src/vehicle_gui.h
@@ -29,6 +29,14 @@ enum TrainDetailsWindowTabs {
TDW_TAB_TOTALS, ///< Tab with sum of total cargo transported
};
+/** Special values for vehicle-related windows for the data parameter of #InvalidateWindowData. */
+enum VehicleInvalidateWindowData {
+ VIWD_REMOVE_ALL_ORDERS = -1, ///< Removed / replaced all orders (after deleting / sharing).
+ VIWD_MODIFY_ORDERS = -2, ///< Other order modifications.
+ VIWD_CONSIST_CHANGED = -3, ///< Vehicle composition was changed.
+ VIWD_AUTOREPLACE = -4, ///< Autoreplace replaced the vehicle.
+};
+
int DrawVehiclePurchaseInfo(int left, int right, int y, EngineID engine_number);
void DrawTrainImage(const Train *v, int left, int right, int y, VehicleID selection, EngineImageType image_type, int skip, VehicleID drag_dest = INVALID_VEHICLE);