(svn r16224) -Codechange: Move BuildRailStationWidgets and BuildRailWaypointWidgets enums out of their Window structs, extend horizontal scrollbar by 1 pixel.

This commit is contained in:
alberth 2009-05-04 12:09:30 +00:00
parent 80e896fa53
commit 72b00e606f

View File

@ -873,8 +873,6 @@ static void HandleStationPlacement(TileIndex start, TileIndex end)
ShowSelectStationIfNeeded(cmdcont, w, h); ShowSelectStationIfNeeded(cmdcont, w, h);
} }
struct BuildRailStationWindow : public PickerWindowBase {
private:
/** Enum referring to the widgets of the rail stations window */ /** Enum referring to the widgets of the rail stations window */
enum BuildRailStationWidgets { enum BuildRailStationWidgets {
BRSW_CLOSEBOX = 0, BRSW_CLOSEBOX = 0,
@ -912,6 +910,8 @@ private:
BRSW_NEWST_SCROLL BRSW_NEWST_SCROLL
}; };
struct BuildRailStationWindow : public PickerWindowBase {
private:
/** /**
* Verify whether the currently selected station size is allowed after selecting a new station class/type. * Verify whether the currently selected station size is allowed after selecting a new station class/type.
* If not, change the station size variables ( _settings_client.gui.station_numtracks and _settings_client.gui.station_platlength ). * If not, change the station size variables ( _settings_client.gui.station_numtracks and _settings_client.gui.station_platlength ).
@ -1617,8 +1617,6 @@ static void ShowBuildTrainDepotPicker(Window *parent)
new BuildRailDepotWindow(&_build_depot_desc, parent); new BuildRailDepotWindow(&_build_depot_desc, parent);
} }
struct BuildRailWaypointWindow : PickerWindowBase {
private:
/** Enum referring to the widgets of the build NewGRF rail waypoint window */ /** Enum referring to the widgets of the build NewGRF rail waypoint window */
enum BuildRailWaypointWidgets { enum BuildRailWaypointWidgets {
BRWW_CLOSEBOX = 0, BRWW_CLOSEBOX = 0,
@ -1632,7 +1630,7 @@ private:
BRWW_SCROLL, BRWW_SCROLL,
}; };
public: struct BuildRailWaypointWindow : PickerWindowBase {
BuildRailWaypointWindow(const WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent) BuildRailWaypointWindow(const WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent)
{ {
this->hscroll.cap = 5; this->hscroll.cap = 5;
@ -1702,7 +1700,7 @@ static const Widget _build_waypoint_widgets[] = {
{ WWT_PANEL, RESIZE_NONE, COLOUR_DARK_GREEN, 207, 272, 17, 76, 0x0, STR_WAYPOINT_GRAPHICS_TIP}, // BRWW_WAYPOINT_4 { WWT_PANEL, RESIZE_NONE, COLOUR_DARK_GREEN, 207, 272, 17, 76, 0x0, STR_WAYPOINT_GRAPHICS_TIP}, // BRWW_WAYPOINT_4
{ WWT_PANEL, RESIZE_NONE, COLOUR_DARK_GREEN, 275, 340, 17, 76, 0x0, STR_WAYPOINT_GRAPHICS_TIP}, // BRWW_WAYPOINT_5 { WWT_PANEL, RESIZE_NONE, COLOUR_DARK_GREEN, 275, 340, 17, 76, 0x0, STR_WAYPOINT_GRAPHICS_TIP}, // BRWW_WAYPOINT_5
{ WWT_HSCROLLBAR, RESIZE_NONE, COLOUR_DARK_GREEN, 1, 343, 80, 91, 0x0, STR_TOOLTIP_HSCROLL_BAR_SCROLLS_LIST}, // BRWW_SCROLL { WWT_HSCROLLBAR, RESIZE_NONE, COLOUR_DARK_GREEN, 0, 343, 80, 91, 0x0, STR_TOOLTIP_HSCROLL_BAR_SCROLLS_LIST}, // BRWW_SCROLL
{ WIDGETS_END}, { WIDGETS_END},
}; };