Codechange: use better location for the "invalid" action sentinel value
It used to be a random sentinel for end-of-(widget-)list that was used to tell that no action has taken place yet. Since the last action is practically the widget that was pressed, add the sentinel to that enumeration.
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
enum AirportToolbarWidgets {
|
||||
WID_AT_AIRPORT, ///< Build airport button.
|
||||
WID_AT_DEMOLISH, ///< Demolish button.
|
||||
|
||||
INVALID_WID_AT = -1,
|
||||
};
|
||||
|
||||
/** Widgets of the #BuildAirportWindow class. */
|
||||
|
@@ -28,6 +28,8 @@ enum RailToolbarWidgets {
|
||||
WID_RAT_BUILD_TUNNEL, ///< Build a tunnel.
|
||||
WID_RAT_REMOVE, ///< Bulldozer to remove rail.
|
||||
WID_RAT_CONVERT_RAIL, ///< Convert other rail to this type.
|
||||
|
||||
INVALID_WID_RAT = -1,
|
||||
};
|
||||
|
||||
/** Widgets of the #BuildRailStationWindow class. */
|
||||
|
@@ -26,6 +26,8 @@ enum RoadToolbarWidgets {
|
||||
WID_ROT_BUILD_TUNNEL, ///< Build tunnel.
|
||||
WID_ROT_REMOVE, ///< Remove road.
|
||||
WID_ROT_CONVERT_ROAD, ///< Convert road.
|
||||
|
||||
INVALID_WID_ROT = -1,
|
||||
};
|
||||
|
||||
/** Widgets of the #BuildRoadDepotWindow class. */
|
||||
|
@@ -22,6 +22,8 @@ enum TerraformToolbarWidgets {
|
||||
WID_TT_PLANT_TREES, ///< Plant trees button (note: opens separate window, no place-push-button).
|
||||
WID_TT_PLACE_SIGN, ///< Place sign button.
|
||||
WID_TT_PLACE_OBJECT, ///< Place object button.
|
||||
|
||||
INVALID_WID_TT = -1,
|
||||
};
|
||||
|
||||
/** Widgets of the #ScenarioEditorLandscapeGenerationWindow class. */
|
||||
@@ -42,6 +44,8 @@ enum EditorTerraformToolbarWidgets {
|
||||
WID_ETT_DECREASE_SIZE, ///< Downwards arrow button to decrease terraforming size.
|
||||
WID_ETT_NEW_SCENARIO, ///< Button for generating a new scenario.
|
||||
WID_ETT_RESET_LANDSCAPE, ///< Button for removing all company-owned property.
|
||||
|
||||
INVALID_WID_ETT = -1,
|
||||
};
|
||||
|
||||
#endif /* WIDGETS_TERRAFORM_WIDGET_H */
|
||||
|
Reference in New Issue
Block a user