diff options
author | truebrain <truebrain@openttd.org> | 2011-12-16 16:23:50 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-16 16:23:50 +0000 |
commit | 98d3f11d45c879b6cb0728c7a77fab349329abe8 (patch) | |
tree | ed784007a33a4f0320dbf07ef99b35a060f142f5 /src/widgets | |
parent | 2aa774e831ad1cb7849c998759449ef777c5c664 (diff) | |
download | openttd-98d3f11d45c879b6cb0728c7a77fab349329abe8.tar.xz |
(svn r23529) -Codechange: make all widget enum values unique and make them include the files they need to compile
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/graph_widget.h | 2 | ||||
-rw-r--r-- | src/widgets/newgrf_widget.h | 4 | ||||
-rw-r--r-- | src/widgets/news_widget.h | 2 | ||||
-rw-r--r-- | src/widgets/rail_widget.h | 40 | ||||
-rw-r--r-- | src/widgets/road_widget.h | 34 | ||||
-rw-r--r-- | src/widgets/sign_widget.h | 13 | ||||
-rw-r--r-- | src/widgets/subsidy_widget.h | 5 |
7 files changed, 56 insertions, 44 deletions
diff --git a/src/widgets/graph_widget.h b/src/widgets/graph_widget.h index b2d95c98a..66c637086 100644 --- a/src/widgets/graph_widget.h +++ b/src/widgets/graph_widget.h @@ -12,6 +12,8 @@ #ifndef WIDGETS_GRAPH_WIDGET_H #define WIDGETS_GRAPH_WIDGET_H +#include "../economy_type.h" + /** Widgets of the WC_GRAPH_LEGEND. */ enum GraphLegendWidgetNumbers { GLW_BACKGROUND, diff --git a/src/widgets/newgrf_widget.h b/src/widgets/newgrf_widget.h index d76d3019b..b5d219fee 100644 --- a/src/widgets/newgrf_widget.h +++ b/src/widgets/newgrf_widget.h @@ -12,6 +12,8 @@ #ifndef WIDGETS_NEWGRF_WIDGET_H #define WIDGETS_NEWGRF_WIDGET_H +#include "../newgrf_config.h" + /** Widgets of the WC_GRF_PARAMETERS. */ enum ShowNewGRFParametersWidgets { GRFPAR_WIDGET_SHOW_NUMPAR, ///< #NWID_SELECTION to optionally display #GRFPAR_WIDGET_NUMPAR @@ -67,7 +69,7 @@ enum ShowNewGRFStateWidgets { /** Widgets of the WC_MODAL_PROGRESS (WC_MODAL_PROGRESS is also used in GenerationProgressWindowWidgets). */ enum ScanProgressWindowWidgets { SPWW_PROGRESS_BAR, ///< Simple progress bar. - GPWW_PROGRESS_TEXT, ///< Text explaining what is happening. + SPWW_PROGRESS_TEXT, ///< Text explaining what is happening. }; #endif /* WIDGETS_NEWGRF_WIDGET_H */ diff --git a/src/widgets/news_widget.h b/src/widgets/news_widget.h index 5326188a1..35925dff1 100644 --- a/src/widgets/news_widget.h +++ b/src/widgets/news_widget.h @@ -12,6 +12,8 @@ #ifndef WIDGETS_NEWS_WIDGET_H #define WIDGETS_NEWS_WIDGET_H +#include "../news_type.h" + /** Constants in the message options window. */ enum MessageOptionsSpace { MOS_WIDG_PER_SETTING = 4, ///< Number of widgets needed for each news category, starting at widget #WIDGET_NEWSOPT_START_OPTION. diff --git a/src/widgets/rail_widget.h b/src/widgets/rail_widget.h index ebf3b2584..0a56f985f 100644 --- a/src/widgets/rail_widget.h +++ b/src/widgets/rail_widget.h @@ -14,21 +14,22 @@ /** Widgets of the WC_BUILD_TOOLBAR (WC_BUILD_TOOLBAR is also used in others). */ enum RailToolbarWidgets { - RTW_CAPTION, - RTW_BUILD_NS, - RTW_BUILD_X, - RTW_BUILD_EW, - RTW_BUILD_Y, - RTW_AUTORAIL, - RTW_DEMOLISH, - RTW_BUILD_DEPOT, - RTW_BUILD_WAYPOINT, - RTW_BUILD_STATION, - RTW_BUILD_SIGNALS, - RTW_BUILD_BRIDGE, - RTW_BUILD_TUNNEL, - RTW_REMOVE, - RTW_CONVERT_RAIL, + /* Name starts with RA instead of R, becuase of collision with RoadToolbarWidgets */ + RATW_CAPTION, + RATW_BUILD_NS, + RATW_BUILD_X, + RATW_BUILD_EW, + RATW_BUILD_Y, + RATW_AUTORAIL, + RATW_DEMOLISH, + RATW_BUILD_DEPOT, + RATW_BUILD_WAYPOINT, + RATW_BUILD_STATION, + RATW_BUILD_SIGNALS, + RATW_BUILD_BRIDGE, + RATW_BUILD_TUNNEL, + RATW_REMOVE, + RATW_CONVERT_RAIL, }; /** Widgets of the WC_BUILD_STATION (WC_BUILD_STATION is also used in others). */ @@ -96,10 +97,11 @@ enum BuildSignalWidgets { /** Widgets of the WC_BUILD_DEPOT (WC_BUILD_DEPOT is also used in others). */ enum BuildRailDepotWidgets { - BRDW_DEPOT_NE, - BRDW_DEPOT_SE, - BRDW_DEPOT_SW, - BRDW_DEPOT_NW, + /* Name starts with BRA instead of BR, becuase of collision with BuildRoadDepotWidgets */ + BRADW_DEPOT_NE, + BRADW_DEPOT_SE, + BRADW_DEPOT_SW, + BRADW_DEPOT_NW, }; /** Widgets of the WC_BUILD_DEPOT (WC_BUILD_DEPOT is also used in others). */ diff --git a/src/widgets/road_widget.h b/src/widgets/road_widget.h index f2e5f54ca..2f948dfc9 100644 --- a/src/widgets/road_widget.h +++ b/src/widgets/road_widget.h @@ -14,26 +14,28 @@ /** Widgets of the WC_SCEN_BUILD_TOOLBAR / WC_BUILD_TOOLBAR (WC_SCEN_BUILD_TOOLBAR / WC_BUILD_TOOLBAR is also used in others). */ enum RoadToolbarWidgets { - RTW_ROAD_X, - RTW_ROAD_Y, - RTW_AUTOROAD, - RTW_DEMOLISH, - RTW_DEPOT, - RTW_BUS_STATION, - RTW_TRUCK_STATION, - RTW_ONE_WAY, - RTW_BUILD_BRIDGE, - RTW_BUILD_TUNNEL, - RTW_REMOVE, + /* Name starts with RO instead of R, becuase of collision with RailToolbarWidgets */ + ROTW_ROAD_X, + ROTW_ROAD_Y, + ROTW_AUTOROAD, + ROTW_DEMOLISH, + ROTW_DEPOT, + ROTW_BUS_STATION, + ROTW_TRUCK_STATION, + ROTW_ONE_WAY, + ROTW_BUILD_BRIDGE, + ROTW_BUILD_TUNNEL, + ROTW_REMOVE, }; /** Widgets of the WC_BUILD_DEPOT (WC_BUILD_DEPOT is also used in others). */ enum BuildRoadDepotWidgets { - BRDW_CAPTION, - BRDW_DEPOT_NE, - BRDW_DEPOT_SE, - BRDW_DEPOT_SW, - BRDW_DEPOT_NW, + /* Name starts with BRO instead of BR, becuase of collision with BuildRailDepotWidgets */ + BRODW_CAPTION, + BRODW_DEPOT_NE, + BRODW_DEPOT_SE, + BRODW_DEPOT_SW, + BRODW_DEPOT_NW, }; /** Widgets of the WC_BUS_STATION / WC_TRUCK_STATION. */ diff --git a/src/widgets/sign_widget.h b/src/widgets/sign_widget.h index 0163334cc..8d65bb309 100644 --- a/src/widgets/sign_widget.h +++ b/src/widgets/sign_widget.h @@ -14,12 +14,13 @@ /** Widgets of the WC_SIGN_LIST. */ enum SignListWidgets { - SLW_CAPTION, - SLW_LIST, - SLW_SCROLLBAR, - SLW_FILTER_TEXT, ///< Text box for typing a filter string - SLW_FILTER_MATCH_CASE_BTN, ///< Button to toggle if case sensitive filtering should be used - SLW_FILTER_CLEAR_BTN, ///< Button to clear the filter + /* Name starts with SI instead of S, becuase of collision with StationListWidgets */ + SILW_CAPTION, + SILW_LIST, + SILW_SCROLLBAR, + SILW_FILTER_TEXT, ///< Text box for typing a filter string + SILW_FILTER_MATCH_CASE_BTN, ///< Button to toggle if case sensitive filtering should be used + SILW_FILTER_CLEAR_BTN, ///< Button to clear the filter }; /** Widgets of the WC_QUERY_STRING (WC_QUERY_STRING is also used in QueryStringWidgets). */ diff --git a/src/widgets/subsidy_widget.h b/src/widgets/subsidy_widget.h index db6472c5f..656fd8604 100644 --- a/src/widgets/subsidy_widget.h +++ b/src/widgets/subsidy_widget.h @@ -14,8 +14,9 @@ /** Widgets of the WC_SUBSIDIES_LIST. */ enum SubsidyListWidgets { - SLW_PANEL, - SLW_SCROLLBAR, + /* Name starts with SU instead of S, becuase of collision with StationListWidgets */ + SULW_PANEL, + SULW_SCROLLBAR, }; #endif /* WIDGETS_SUBSIDY_WIDGET_H */ |