summaryrefslogtreecommitdiff
path: root/src/rail_gui.cpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-15 22:22:55 +0000
committertruebrain <truebrain@openttd.org>2011-12-15 22:22:55 +0000
commit2aa774e831ad1cb7849c998759449ef777c5c664 (patch)
tree37293298be999cb3446fe4af7f11e107bfa17c3d /src/rail_gui.cpp
parentfd559171b4ab5ce09b67aa8c4e9f2d0482a09558 (diff)
downloadopenttd-2aa774e831ad1cb7849c998759449ef777c5c664.tar.xz
(svn r23528) -Codechange: move widget enums to widgets/NNN_type.h
Diffstat (limited to 'src/rail_gui.cpp')
-rw-r--r--src/rail_gui.cpp101
1 files changed, 2 insertions, 99 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
index 80c2d143b..195202d80 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -37,6 +37,8 @@
#include "station_map.h"
#include "tunnelbridge_map.h"
+#include "widgets/rail_widget.h"
+
#include "table/strings.h"
static RailType _cur_railtype; ///< Rail type of the current build-rail toolbar.
@@ -277,27 +279,6 @@ void CcBuildRailTunnel(const CommandCost &result, TileIndex tile, uint32 p1, uin
}
}
-
-/** Enum referring to the widgets of the build rail toolbar */
-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,
-};
-
-
/**
* Toggles state of the Remove button of Build rail toolbar
* @param w window the button belongs to
@@ -892,48 +873,6 @@ static void HandleStationPlacement(TileIndex start, TileIndex end)
ShowSelectStationIfNeeded(cmdcont, ta);
}
-/** Enum referring to the widgets of the rail stations window */
-enum BuildRailStationWidgets {
- BRSW_PLATFORM_DIR_X, ///< Button to select '/' view.
- BRSW_PLATFORM_DIR_Y, ///< Button to select '\' view.
-
- BRSW_PLATFORM_NUM_1, ///< Button to select stations with a single platform.
- BRSW_PLATFORM_NUM_2, ///< Button to select stations with 2 platforms.
- BRSW_PLATFORM_NUM_3, ///< Button to select stations with 3 platforms.
- BRSW_PLATFORM_NUM_4, ///< Button to select stations with 4 platforms.
- BRSW_PLATFORM_NUM_5, ///< Button to select stations with 5 platforms.
- BRSW_PLATFORM_NUM_6, ///< Button to select stations with 6 platforms.
- BRSW_PLATFORM_NUM_7, ///< Button to select stations with 7 platforms.
-
- BRSW_PLATFORM_LEN_1, ///< Button to select single tile length station platforms.
- BRSW_PLATFORM_LEN_2, ///< Button to select 2 tiles length station platforms.
- BRSW_PLATFORM_LEN_3, ///< Button to select 3 tiles length station platforms.
- BRSW_PLATFORM_LEN_4, ///< Button to select 4 tiles length station platforms.
- BRSW_PLATFORM_LEN_5, ///< Button to select 5 tiles length station platforms.
- BRSW_PLATFORM_LEN_6, ///< Button to select 6 tiles length station platforms.
- BRSW_PLATFORM_LEN_7, ///< Button to select 7 tiles length station platforms.
-
- BRSW_PLATFORM_DRAG_N_DROP, ///< Button to enable drag and drop type station placement.
-
- BRSW_HIGHLIGHT_OFF, ///< Button for turning coverage highlighting off.
- BRSW_HIGHLIGHT_ON, ///< Button for turning coverage highlighting on.
- BRSW_COVERAGE_TEXTS, ///< Empty space for the coverage texts.
-
- BRSW_MATRIX, ///< Matrix widget displaying the available stations.
- BRSW_IMAGE, ///< Panel used at each cell of the matrix.
- BRSW_MATRIX_SCROLL, ///< Scrollbar of the matrix widget.
-
- BRSW_SHOW_NEWST_ADDITIONS, ///< Selection for newstation class selection list.
- BRSW_SHOW_NEWST_MATRIX, ///< Selection for newstation image matrix.
- BRSW_SHOW_NEWST_RESIZE, ///< Selection for panel and resize at bottom right for newstation.
- BRSW_SHOW_NEWST_TYPE, ///< Display of selected station type.
- BRSW_NEWST_LIST, ///< List with available newstation classes.
- BRSW_NEWST_SCROLL, ///< Scrollbar of the #BRSW_NEWST_LIST.
-
- BRSW_PLATFORM_NUM_BEGIN = BRSW_PLATFORM_NUM_1 - 1,
- BRSW_PLATFORM_LEN_BEGIN = BRSW_PLATFORM_LEN_1 - 1,
-};
-
struct BuildRailStationWindow : public PickerWindowBase {
private:
uint line_height; ///< Height of a single line in the newstation selection matrix (#BRSW_NEWST_LIST widget).
@@ -1498,27 +1437,6 @@ static void ShowStationBuilder(Window *parent)
new BuildRailStationWindow(&_station_builder_desc, parent, newstations);
}
-/** Enum referring to the widgets of the signal window */
-enum BuildSignalWidgets {
- BSW_SEMAPHORE_NORM,
- BSW_SEMAPHORE_ENTRY,
- BSW_SEMAPHORE_EXIT,
- BSW_SEMAPHORE_COMBO,
- BSW_SEMAPHORE_PBS,
- BSW_SEMAPHORE_PBS_OWAY,
- BSW_ELECTRIC_NORM,
- BSW_ELECTRIC_ENTRY,
- BSW_ELECTRIC_EXIT,
- BSW_ELECTRIC_COMBO,
- BSW_ELECTRIC_PBS,
- BSW_ELECTRIC_PBS_OWAY,
- BSW_CONVERT,
- BSW_DRAG_SIGNALS_DENSITY,
- BSW_DRAG_SIGNALS_DENSITY_LABEL,
- BSW_DRAG_SIGNALS_DENSITY_DECREASE,
- BSW_DRAG_SIGNALS_DENSITY_INCREASE,
-};
-
struct BuildSignalWindow : public PickerWindowBase {
private:
/**
@@ -1702,14 +1620,6 @@ static void ShowSignalBuilder(Window *parent)
new BuildSignalWindow(&_signal_builder_desc, parent);
}
-/** Enum referring to the widgets of the build rail depot window */
-enum BuildRailDepotWidgets {
- BRDW_DEPOT_NE,
- BRDW_DEPOT_SE,
- BRDW_DEPOT_SW,
- BRDW_DEPOT_NW,
-};
-
struct BuildRailDepotWindow : public PickerWindowBase {
BuildRailDepotWindow(const WindowDesc *desc, Window *parent) : PickerWindowBase(parent)
{
@@ -1784,13 +1694,6 @@ static void ShowBuildTrainDepotPicker(Window *parent)
new BuildRailDepotWindow(&_build_depot_desc, parent);
}
-/** Enum referring to the widgets of the build NewGRF rail waypoint window */
-enum BuildRailWaypointWidgets {
- BRWW_WAYPOINT_MATRIX,
- BRWW_WAYPOINT,
- BRWW_SCROLL,
-};
-
struct BuildRailWaypointWindow : PickerWindowBase {
BuildRailWaypointWindow(const WindowDesc *desc, Window *parent) : PickerWindowBase(parent)
{