summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2011-12-16 18:52:15 +0000
committerplanetmaker <planetmaker@openttd.org>2011-12-16 18:52:15 +0000
commit6bbae674b8208e265280e355d72ceed9b101a1ab (patch)
tree6770bbc49463ad575fcce47e7459343439d9a90a
parentff4bfded7af49679bb5b6a6f586ac037b597d84c (diff)
downloadopenttd-6bbae674b8208e265280e355d72ceed9b101a1ab.tar.xz
(svn r23559) -Codechange: Document and name consistently road build widgets
-rw-r--r--src/road_gui.cpp324
-rw-r--r--src/widgets/road_widget.h54
2 files changed, 189 insertions, 189 deletions
diff --git a/src/road_gui.cpp b/src/road_gui.cpp
index 573261a32..8ac0306d4 100644
--- a/src/road_gui.cpp
+++ b/src/road_gui.cpp
@@ -278,9 +278,9 @@ typedef void OnButtonClick(Window *w);
*/
static void ToggleRoadButton_Remove(Window *w)
{
- w->ToggleWidgetLoweredState(ROTW_REMOVE);
- w->SetWidgetDirty(ROTW_REMOVE);
- _remove_button_clicked = w->IsWidgetLowered(ROTW_REMOVE);
+ w->ToggleWidgetLoweredState(WID_ROT_REMOVE);
+ w->SetWidgetDirty(WID_ROT_REMOVE);
+ _remove_button_clicked = w->IsWidgetLowered(WID_ROT_REMOVE);
SetSelectionRed(_remove_button_clicked);
}
@@ -291,10 +291,10 @@ static void ToggleRoadButton_Remove(Window *w)
*/
static bool RoadToolbar_CtrlChanged(Window *w)
{
- if (w->IsWidgetDisabled(ROTW_REMOVE)) return false;
+ if (w->IsWidgetDisabled(WID_ROT_REMOVE)) return false;
/* allow ctrl to switch remove mode only for these widgets */
- for (uint i = ROTW_ROAD_X; i <= ROTW_AUTOROAD; i++) {
+ for (uint i = WID_ROT_ROAD_X; i <= WID_ROT_AUTOROAD; i++) {
if (w->IsWidgetLowered(i)) {
ToggleRoadButton_Remove(w);
return true;
@@ -312,8 +312,8 @@ struct BuildRoadToolbarWindow : Window {
{
this->InitNested(desc, window_number);
this->SetWidgetsDisabledState(true,
- ROTW_REMOVE,
- ROTW_ONE_WAY,
+ WID_ROT_REMOVE,
+ WID_ROT_ONE_WAY,
WIDGET_LIST_END);
this->OnInvalidateData();
@@ -336,9 +336,9 @@ struct BuildRoadToolbarWindow : Window {
{
if (!gui_scope) return;
this->SetWidgetsDisabledState(!CanBuildVehicleInfrastructure(VEH_ROAD),
- ROTW_DEPOT,
- ROTW_BUS_STATION,
- ROTW_TRUCK_STATION,
+ WID_ROT_DEPOT,
+ WID_ROT_BUS_STATION,
+ WID_ROT_TRUCK_STATION,
WIDGET_LIST_END);
}
@@ -353,28 +353,28 @@ struct BuildRoadToolbarWindow : Window {
* by the other buttons so they don't act on themselfs.
* Both are only valid if they are able to apply as options. */
switch (clicked_widget) {
- case ROTW_REMOVE:
- this->RaiseWidget(ROTW_ONE_WAY);
- this->SetWidgetDirty(ROTW_ONE_WAY);
+ case WID_ROT_REMOVE:
+ this->RaiseWidget(WID_ROT_ONE_WAY);
+ this->SetWidgetDirty(WID_ROT_ONE_WAY);
break;
- case ROTW_ONE_WAY:
- this->RaiseWidget(ROTW_REMOVE);
- this->SetWidgetDirty(ROTW_REMOVE);
+ case WID_ROT_ONE_WAY:
+ this->RaiseWidget(WID_ROT_REMOVE);
+ this->SetWidgetDirty(WID_ROT_REMOVE);
break;
- case ROTW_BUS_STATION:
- case ROTW_TRUCK_STATION:
- this->DisableWidget(ROTW_ONE_WAY);
- this->SetWidgetDisabledState(ROTW_REMOVE, !this->IsWidgetLowered(clicked_widget));
+ case WID_ROT_BUS_STATION:
+ case WID_ROT_TRUCK_STATION:
+ this->DisableWidget(WID_ROT_ONE_WAY);
+ this->SetWidgetDisabledState(WID_ROT_REMOVE, !this->IsWidgetLowered(clicked_widget));
break;
- case ROTW_ROAD_X:
- case ROTW_ROAD_Y:
- case ROTW_AUTOROAD:
+ case WID_ROT_ROAD_X:
+ case WID_ROT_ROAD_Y:
+ case WID_ROT_AUTOROAD:
this->SetWidgetsDisabledState(!this->IsWidgetLowered(clicked_widget),
- ROTW_REMOVE,
- ROTW_ONE_WAY,
+ WID_ROT_REMOVE,
+ WID_ROT_ONE_WAY,
WIDGET_LIST_END);
break;
@@ -382,12 +382,12 @@ struct BuildRoadToolbarWindow : Window {
/* When any other buttons than road/station, raise and
* disable the removal button */
this->SetWidgetsDisabledState(true,
- ROTW_REMOVE,
- ROTW_ONE_WAY,
+ WID_ROT_REMOVE,
+ WID_ROT_ONE_WAY,
WIDGET_LIST_END);
this->SetWidgetsLoweredState(false,
- ROTW_REMOVE,
- ROTW_ONE_WAY,
+ WID_ROT_REMOVE,
+ WID_ROT_ONE_WAY,
WIDGET_LIST_END);
break;
}
@@ -398,69 +398,69 @@ struct BuildRoadToolbarWindow : Window {
_remove_button_clicked = false;
_one_way_button_clicked = false;
switch (widget) {
- case ROTW_ROAD_X:
- HandlePlacePushButton(this, ROTW_ROAD_X, _road_type_infos[_cur_roadtype].cursor_nwse, HT_RECT);
+ case WID_ROT_ROAD_X:
+ HandlePlacePushButton(this, WID_ROT_ROAD_X, _road_type_infos[_cur_roadtype].cursor_nwse, HT_RECT);
this->last_started_action = widget;
break;
- case ROTW_ROAD_Y:
- HandlePlacePushButton(this, ROTW_ROAD_Y, _road_type_infos[_cur_roadtype].cursor_nesw, HT_RECT);
+ case WID_ROT_ROAD_Y:
+ HandlePlacePushButton(this, WID_ROT_ROAD_Y, _road_type_infos[_cur_roadtype].cursor_nesw, HT_RECT);
this->last_started_action = widget;
break;
- case ROTW_AUTOROAD:
- HandlePlacePushButton(this, ROTW_AUTOROAD, _road_type_infos[_cur_roadtype].cursor_autoroad, HT_RECT);
+ case WID_ROT_AUTOROAD:
+ HandlePlacePushButton(this, WID_ROT_AUTOROAD, _road_type_infos[_cur_roadtype].cursor_autoroad, HT_RECT);
this->last_started_action = widget;
break;
- case ROTW_DEMOLISH:
- HandlePlacePushButton(this, ROTW_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL);
+ case WID_ROT_DEMOLISH:
+ HandlePlacePushButton(this, WID_ROT_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL);
this->last_started_action = widget;
break;
- case ROTW_DEPOT:
+ case WID_ROT_DEPOT:
if (_game_mode == GM_EDITOR || !CanBuildVehicleInfrastructure(VEH_ROAD)) return;
- if (HandlePlacePushButton(this, ROTW_DEPOT, SPR_CURSOR_ROAD_DEPOT, HT_RECT)) {
+ if (HandlePlacePushButton(this, WID_ROT_DEPOT, SPR_CURSOR_ROAD_DEPOT, HT_RECT)) {
ShowRoadDepotPicker(this);
this->last_started_action = widget;
}
break;
- case ROTW_BUS_STATION:
+ case WID_ROT_BUS_STATION:
if (_game_mode == GM_EDITOR || !CanBuildVehicleInfrastructure(VEH_ROAD)) return;
- if (HandlePlacePushButton(this, ROTW_BUS_STATION, SPR_CURSOR_BUS_STATION, HT_RECT)) {
+ if (HandlePlacePushButton(this, WID_ROT_BUS_STATION, SPR_CURSOR_BUS_STATION, HT_RECT)) {
ShowRVStationPicker(this, ROADSTOP_BUS);
this->last_started_action = widget;
}
break;
- case ROTW_TRUCK_STATION:
+ case WID_ROT_TRUCK_STATION:
if (_game_mode == GM_EDITOR || !CanBuildVehicleInfrastructure(VEH_ROAD)) return;
- if (HandlePlacePushButton(this, ROTW_TRUCK_STATION, SPR_CURSOR_TRUCK_STATION, HT_RECT)) {
+ if (HandlePlacePushButton(this, WID_ROT_TRUCK_STATION, SPR_CURSOR_TRUCK_STATION, HT_RECT)) {
ShowRVStationPicker(this, ROADSTOP_TRUCK);
this->last_started_action = widget;
}
break;
- case ROTW_ONE_WAY:
- if (this->IsWidgetDisabled(ROTW_ONE_WAY)) return;
+ case WID_ROT_ONE_WAY:
+ if (this->IsWidgetDisabled(WID_ROT_ONE_WAY)) return;
this->SetDirty();
- this->ToggleWidgetLoweredState(ROTW_ONE_WAY);
+ this->ToggleWidgetLoweredState(WID_ROT_ONE_WAY);
SetSelectionRed(false);
break;
- case ROTW_BUILD_BRIDGE:
- HandlePlacePushButton(this, ROTW_BUILD_BRIDGE, SPR_CURSOR_BRIDGE, HT_RECT);
+ case WID_ROT_BUILD_BRIDGE:
+ HandlePlacePushButton(this, WID_ROT_BUILD_BRIDGE, SPR_CURSOR_BRIDGE, HT_RECT);
this->last_started_action = widget;
break;
- case ROTW_BUILD_TUNNEL:
- HandlePlacePushButton(this, ROTW_BUILD_TUNNEL, SPR_CURSOR_ROAD_TUNNEL, HT_SPECIAL);
+ case WID_ROT_BUILD_TUNNEL:
+ HandlePlacePushButton(this, WID_ROT_BUILD_TUNNEL, SPR_CURSOR_ROAD_TUNNEL, HT_SPECIAL);
this->last_started_action = widget;
break;
- case ROTW_REMOVE:
- if (this->IsWidgetDisabled(ROTW_REMOVE)) return;
+ case WID_ROT_REMOVE:
+ if (this->IsWidgetDisabled(WID_ROT_REMOVE)) return;
DeleteWindowById(WC_SELECT_STATION, 0);
ToggleRoadButton_Remove(this);
@@ -484,50 +484,50 @@ struct BuildRoadToolbarWindow : Window {
virtual void OnPlaceObject(Point pt, TileIndex tile)
{
- _remove_button_clicked = this->IsWidgetLowered(ROTW_REMOVE);
- _one_way_button_clicked = this->IsWidgetLowered(ROTW_ONE_WAY);
+ _remove_button_clicked = this->IsWidgetLowered(WID_ROT_REMOVE);
+ _one_way_button_clicked = this->IsWidgetLowered(WID_ROT_ONE_WAY);
switch (this->last_started_action) {
- case ROTW_ROAD_X:
+ case WID_ROT_ROAD_X:
_place_road_flag = RF_DIR_X;
if (_tile_fract_coords.x >= 8) _place_road_flag |= RF_START_HALFROAD_X;
VpStartPlaceSizing(tile, VPM_FIX_Y, DDSP_PLACE_ROAD_X_DIR);
break;
- case ROTW_ROAD_Y:
+ case WID_ROT_ROAD_Y:
_place_road_flag = RF_DIR_Y;
if (_tile_fract_coords.y >= 8) _place_road_flag |= RF_START_HALFROAD_Y;
VpStartPlaceSizing(tile, VPM_FIX_X, DDSP_PLACE_ROAD_Y_DIR);
break;
- case ROTW_AUTOROAD:
+ case WID_ROT_AUTOROAD:
_place_road_flag = RF_NONE;
if (_tile_fract_coords.x >= 8) _place_road_flag |= RF_START_HALFROAD_X;
if (_tile_fract_coords.y >= 8) _place_road_flag |= RF_START_HALFROAD_Y;
VpStartPlaceSizing(tile, VPM_X_OR_Y, DDSP_PLACE_AUTOROAD);
break;
- case ROTW_DEMOLISH:
+ case WID_ROT_DEMOLISH:
PlaceProc_DemolishArea(tile);
break;
- case ROTW_DEPOT:
+ case WID_ROT_DEPOT:
DoCommandP(tile, _cur_roadtype << 2 | _road_depot_orientation, 0,
CMD_BUILD_ROAD_DEPOT | CMD_MSG(_road_type_infos[_cur_roadtype].err_depot), CcRoadDepot);
break;
- case ROTW_BUS_STATION:
+ case WID_ROT_BUS_STATION:
PlaceRoad_BusStation(tile);
break;
- case ROTW_TRUCK_STATION:
+ case WID_ROT_TRUCK_STATION:
PlaceRoad_TruckStation(tile);
break;
- case ROTW_BUILD_BRIDGE:
+ case WID_ROT_BUILD_BRIDGE:
PlaceRoad_Bridge(tile, this);
break;
- case ROTW_BUILD_TUNNEL:
+ case WID_ROT_BUILD_TUNNEL:
DoCommandP(tile, RoadTypeToRoadTypes(_cur_roadtype) | (TRANSPORT_ROAD << 8), 0,
CMD_BUILD_TUNNEL | CMD_MSG(STR_ERROR_CAN_T_BUILD_TUNNEL_HERE), CcBuildRoadTunnel);
break;
@@ -540,11 +540,11 @@ struct BuildRoadToolbarWindow : Window {
{
this->RaiseButtons();
this->SetWidgetsDisabledState(true,
- ROTW_REMOVE,
- ROTW_ONE_WAY,
+ WID_ROT_REMOVE,
+ WID_ROT_ONE_WAY,
WIDGET_LIST_END);
- this->SetWidgetDirty(ROTW_REMOVE);
- this->SetWidgetDirty(ROTW_ONE_WAY);
+ this->SetWidgetDirty(WID_ROT_REMOVE);
+ this->SetWidgetDirty(WID_ROT_ONE_WAY);
DeleteWindowById(WC_BUS_STATION, TRANSPORT_ROAD);
DeleteWindowById(WC_TRUCK_STATION, TRANSPORT_ROAD);
@@ -664,17 +664,17 @@ struct BuildRoadToolbarWindow : Window {
};
Hotkey<BuildRoadToolbarWindow> BuildRoadToolbarWindow::roadtoolbar_hotkeys[] = {
- Hotkey<BuildRoadToolbarWindow>('1', "build_x", ROTW_ROAD_X),
- Hotkey<BuildRoadToolbarWindow>('2', "build_y", ROTW_ROAD_Y),
- Hotkey<BuildRoadToolbarWindow>('3', "autoroad", ROTW_AUTOROAD),
- Hotkey<BuildRoadToolbarWindow>('4', "demolish", ROTW_DEMOLISH),
- Hotkey<BuildRoadToolbarWindow>('5', "depot", ROTW_DEPOT),
- Hotkey<BuildRoadToolbarWindow>('6', "bus_station", ROTW_BUS_STATION),
- Hotkey<BuildRoadToolbarWindow>('7', "truck_station", ROTW_TRUCK_STATION),
- Hotkey<BuildRoadToolbarWindow>('8', "oneway", ROTW_ONE_WAY),
- Hotkey<BuildRoadToolbarWindow>('B', "bridge", ROTW_BUILD_BRIDGE),
- Hotkey<BuildRoadToolbarWindow>('T', "tunnel", ROTW_BUILD_TUNNEL),
- Hotkey<BuildRoadToolbarWindow>('R', "remove", ROTW_REMOVE),
+ Hotkey<BuildRoadToolbarWindow>('1', "build_x", WID_ROT_ROAD_X),
+ Hotkey<BuildRoadToolbarWindow>('2', "build_y", WID_ROT_ROAD_Y),
+ Hotkey<BuildRoadToolbarWindow>('3', "autoroad", WID_ROT_AUTOROAD),
+ Hotkey<BuildRoadToolbarWindow>('4', "demolish", WID_ROT_DEMOLISH),
+ Hotkey<BuildRoadToolbarWindow>('5', "depot", WID_ROT_DEPOT),
+ Hotkey<BuildRoadToolbarWindow>('6', "bus_station", WID_ROT_BUS_STATION),
+ Hotkey<BuildRoadToolbarWindow>('7', "truck_station", WID_ROT_TRUCK_STATION),
+ Hotkey<BuildRoadToolbarWindow>('8', "oneway", WID_ROT_ONE_WAY),
+ Hotkey<BuildRoadToolbarWindow>('B', "bridge", WID_ROT_BUILD_BRIDGE),
+ Hotkey<BuildRoadToolbarWindow>('T', "tunnel", WID_ROT_BUILD_TUNNEL),
+ Hotkey<BuildRoadToolbarWindow>('R', "remove", WID_ROT_REMOVE),
HOTKEY_LIST_END(BuildRoadToolbarWindow)
};
Hotkey<BuildRoadToolbarWindow> *_roadtoolbar_hotkeys = BuildRoadToolbarWindow::roadtoolbar_hotkeys;
@@ -687,28 +687,28 @@ static const NWidgetPart _nested_build_road_widgets[] = {
NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
EndContainer(),
NWidget(NWID_HORIZONTAL),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_ROAD_X),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_ROAD_X),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_X_DIR, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_ROAD_Y),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_ROAD_Y),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_Y_DIR, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_AUTOROAD),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_AUTOROAD),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_AUTOROAD, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_DEMOLISH),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_DEMOLISH),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_DYNAMITE, STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_DEPOT),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_DEPOT),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_DEPOT, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_BUS_STATION),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_BUS_STATION),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_BUS_STATION, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_TRUCK_STATION),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_TRUCK_STATION),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_TRUCK_BAY, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY),
NWidget(WWT_PANEL, COLOUR_DARK_GREEN, -1), SetMinimalSize(0, 22), SetFill(1, 1), EndContainer(),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_ONE_WAY),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_ONE_WAY),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_ONE_WAY, STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_ONE_WAY_ROAD),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_BUILD_BRIDGE),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_BUILD_BRIDGE),
SetFill(0, 1), SetMinimalSize(43, 22), SetDataTip(SPR_IMG_BRIDGE, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_BUILD_TUNNEL),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_BUILD_TUNNEL),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_TUNNEL, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_REMOVE),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_REMOVE),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_REMOVE, STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD),
EndContainer(),
};
@@ -727,27 +727,27 @@ static const NWidgetPart _nested_build_tramway_widgets[] = {
NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
EndContainer(),
NWidget(NWID_HORIZONTAL),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_ROAD_X),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_ROAD_X),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_TRAMWAY_X_DIR, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_ROAD_Y),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_ROAD_Y),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_TRAMWAY_Y_DIR, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_AUTOROAD),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_AUTOROAD),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_AUTOTRAM, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_DEMOLISH),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_DEMOLISH),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_DYNAMITE, STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_DEPOT),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_DEPOT),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_DEPOT, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_BUS_STATION),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_BUS_STATION),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_BUS_STATION, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_TRUCK_STATION),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_TRUCK_STATION),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_TRUCK_BAY, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION),
NWidget(WWT_PANEL, COLOUR_DARK_GREEN, -1), SetMinimalSize(0, 22), SetFill(1, 1), EndContainer(),
- NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, ROTW_ONE_WAY), SetMinimalSize(0, 0),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_BUILD_BRIDGE),
+ NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, WID_ROT_ONE_WAY), SetMinimalSize(0, 0),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_BUILD_BRIDGE),
SetFill(0, 1), SetMinimalSize(43, 22), SetDataTip(SPR_IMG_BRIDGE, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_BRIDGE),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_BUILD_TUNNEL),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_BUILD_TUNNEL),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_TUNNEL, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_REMOVE),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_REMOVE),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_REMOVE, STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS),
EndContainer(),
};
@@ -792,22 +792,22 @@ static const NWidgetPart _nested_build_road_scen_widgets[] = {
NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
EndContainer(),
NWidget(NWID_HORIZONTAL),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_ROAD_X),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_ROAD_X),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_X_DIR, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_ROAD_Y),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_ROAD_Y),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_Y_DIR, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_AUTOROAD),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_AUTOROAD),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_AUTOROAD, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_DEMOLISH),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_DEMOLISH),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_DYNAMITE, STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC),
NWidget(WWT_PANEL, COLOUR_DARK_GREEN, -1), SetMinimalSize(0, 22), SetFill(1, 1), EndContainer(),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_ONE_WAY),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_ONE_WAY),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_ONE_WAY, STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_ONE_WAY_ROAD),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_BUILD_BRIDGE),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_BUILD_BRIDGE),
SetFill(0, 1), SetMinimalSize(43, 22), SetDataTip(SPR_IMG_BRIDGE, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_BUILD_TUNNEL),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_BUILD_TUNNEL),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_TUNNEL, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ROTW_REMOVE),
+ NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_REMOVE),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_REMOVE, STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD),
EndContainer(),
};
@@ -843,10 +843,10 @@ struct BuildRoadDepotWindow : public PickerWindowBase {
{
this->CreateNestedTree(desc);
- this->LowerWidget(_road_depot_orientation + BRODW_DEPOT_NE);
+ this->LowerWidget(_road_depot_orientation + WID_BROD_DEPOT_NE);
if ( _cur_roadtype == ROADTYPE_TRAM) {
- this->GetWidget<NWidgetCore>(BRODW_CAPTION)->widget_data = STR_BUILD_DEPOT_TRAM_ORIENTATION_CAPTION;
- for (int i = BRODW_DEPOT_NE; i <= BRODW_DEPOT_NW; i++) this->GetWidget<NWidgetCore>(i)->tool_tip = STR_BUILD_DEPOT_TRAM_ORIENTATION_SELECT_TOOLTIP;
+ this->GetWidget<NWidgetCore>(WID_BROD_CAPTION)->widget_data = STR_BUILD_DEPOT_TRAM_ORIENTATION_CAPTION;
+ for (int i = WID_BROD_DEPOT_NE; i <= WID_BROD_DEPOT_NW; i++) this->GetWidget<NWidgetCore>(i)->tool_tip = STR_BUILD_DEPOT_TRAM_ORIENTATION_SELECT_TOOLTIP;
}
this->FinishInitNested(desc, TRANSPORT_ROAD);
@@ -854,21 +854,21 @@ struct BuildRoadDepotWindow : public PickerWindowBase {
virtual void DrawWidget(const Rect &r, int widget) const
{
- if (!IsInsideMM(widget, BRODW_DEPOT_NE, BRODW_DEPOT_NW + 1)) return;
+ if (!IsInsideMM(widget, WID_BROD_DEPOT_NE, WID_BROD_DEPOT_NW + 1)) return;
- DrawRoadDepotSprite(r.left - 1, r.top, (DiagDirection)(widget - BRODW_DEPOT_NE + DIAGDIR_NE), _cur_roadtype);
+ DrawRoadDepotSprite(r.left - 1, r.top, (DiagDirection)(widget - WID_BROD_DEPOT_NE + DIAGDIR_NE), _cur_roadtype);
}
virtual void OnClick(Point pt, int widget, int click_count)
{
switch (widget) {
- case BRODW_DEPOT_NW:
- case BRODW_DEPOT_NE:
- case BRODW_DEPOT_SW:
- case BRODW_DEPOT_SE:
- this->RaiseWidget(_road_depot_orientation + BRODW_DEPOT_NE);
- _road_depot_orientation = (DiagDirection)(widget - BRODW_DEPOT_NE);
- this->LowerWidget(_road_depot_orientation + BRODW_DEPOT_NE);
+ case WID_BROD_DEPOT_NW:
+ case WID_BROD_DEPOT_NE:
+ case WID_BROD_DEPOT_SW:
+ case WID_BROD_DEPOT_SE:
+ this->RaiseWidget(_road_depot_orientation + WID_BROD_DEPOT_NE);
+ _road_depot_orientation = (DiagDirection)(widget - WID_BROD_DEPOT_NE);
+ this->LowerWidget(_road_depot_orientation + WID_BROD_DEPOT_NE);
SndPlayFx(SND_15_BEEP);
this->SetDirty();
break;
@@ -882,25 +882,25 @@ struct BuildRoadDepotWindow : public PickerWindowBase {
static const NWidgetPart _nested_build_road_depot_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
- NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, BRODW_CAPTION), SetDataTip(STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_BROD_CAPTION), SetDataTip(STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_DARK_GREEN),
NWidget(NWID_SPACER), SetMinimalSize(0, 3),
NWidget(NWID_HORIZONTAL_LTR),
NWidget(NWID_SPACER), SetMinimalSize(3, 0), SetFill(1, 0),
NWidget(NWID_VERTICAL),
- NWidget(WWT_PANEL, COLOUR_GREY, BRODW_DEPOT_NW), SetMinimalSize(66, 50), SetDataTip(0x0, STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP),
+ NWidget(WWT_PANEL, COLOUR_GREY, WID_BROD_DEPOT_NW), SetMinimalSize(66, 50), SetDataTip(0x0, STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
- NWidget(WWT_PANEL, COLOUR_GREY, BRODW_DEPOT_SW), SetMinimalSize(66, 50), SetDataTip(0x0, STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP),
+ NWidget(WWT_PANEL, COLOUR_GREY, WID_BROD_DEPOT_SW), SetMinimalSize(66, 50), SetDataTip(0x0, STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP),
EndContainer(),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(2, 0),
NWidget(NWID_VERTICAL),
- NWidget(WWT_PANEL, COLOUR_GREY, BRODW_DEPOT_NE), SetMinimalSize(66, 50), SetDataTip(0x0, STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP),
+ NWidget(WWT_PANEL, COLOUR_GREY, WID_BROD_DEPOT_NE), SetMinimalSize(66, 50), SetDataTip(0x0, STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
- NWidget(WWT_PANEL, COLOUR_GREY, BRODW_DEPOT_SE), SetMinimalSize(66, 50), SetDataTip(0x0, STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP),
+ NWidget(WWT_PANEL, COLOUR_GREY, WID_BROD_DEPOT_SE), SetMinimalSize(66, 50), SetDataTip(0x0, STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP),
EndContainer(),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(3, 0), SetFill(1, 0),
@@ -931,17 +931,17 @@ struct BuildRoadStationWindow : public PickerWindowBase {
_road_station_picker_orientation = DIAGDIR_END;
}
this->SetWidgetsDisabledState(_cur_roadtype == ROADTYPE_TRAM,
- BRSW_STATION_NE,
- BRSW_STATION_SE,
- BRSW_STATION_SW,
- BRSW_STATION_NW,
+ WID_BROS_STATION_NE,
+ WID_BROS_STATION_SE,
+ WID_BROS_STATION_SW,
+ WID_BROS_STATION_NW,
WIDGET_LIST_END);
- this->GetWidget<NWidgetCore>(BRSW_CAPTION)->widget_data = _road_type_infos[_cur_roadtype].picker_title[rs];
- for (uint i = BRSW_STATION_NE; i < BRSW_LT_OFF; i++) this->GetWidget<NWidgetCore>(i)->tool_tip = _road_type_infos[_cur_roadtype].picker_tooltip[rs];
+ this->GetWidget<NWidgetCore>(WID_BROS_CAPTION)->widget_data = _road_type_infos[_cur_roadtype].picker_title[rs];
+ for (uint i = WID_BROS_STATION_NE; i < WID_BROS_LT_OFF; i++) this->GetWidget<NWidgetCore>(i)->tool_tip = _road_type_infos[_cur_roadtype].picker_tooltip[rs];
- this->LowerWidget(_road_station_picker_orientation + BRSW_STATION_NE);
- this->LowerWidget(_settings_client.gui.station_show_coverage + BRSW_LT_OFF);
+ this->LowerWidget(_road_station_picker_orientation + WID_BROS_STATION_NE);
+ this->LowerWidget(_settings_client.gui.station_show_coverage + WID_BROS_LT_OFF);
this->FinishInitNested(desc, TRANSPORT_ROAD);
@@ -966,8 +966,8 @@ struct BuildRoadStationWindow : public PickerWindowBase {
/* 'Accepts' and 'Supplies' texts. */
StationCoverageType sct = (this->window_class == WC_BUS_STATION) ? SCT_PASSENGERS_ONLY : SCT_NON_PASSENGERS_ONLY;
- int top = this->GetWidget<NWidgetBase>(BRSW_LT_ON)->pos_y + this->GetWidget<NWidgetBase>(BRSW_LT_ON)->current_y + WD_PAR_VSEP_NORMAL;
- NWidgetBase *back_nwi = this->GetWidget<NWidgetBase>(BRSW_BACKGROUND);
+ int top = this->GetWidget<NWidgetBase>(WID_BROS_LT_ON)->pos_y + this->GetWidget<NWidgetBase>(WID_BROS_LT_ON)->current_y + WD_PAR_VSEP_NORMAL;
+ NWidgetBase *back_nwi = this->GetWidget<NWidgetBase>(WID_BROS_BACKGROUND);
int right = back_nwi->pos_x + back_nwi->current_x;
int bottom = back_nwi->pos_y + back_nwi->current_y;
top = DrawStationCoverageAreaText(back_nwi->pos_x + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, sct, rad, false) + WD_PAR_VSEP_NORMAL;
@@ -980,34 +980,34 @@ struct BuildRoadStationWindow : public PickerWindowBase {
virtual void DrawWidget(const Rect &r, int widget) const
{
- if (!IsInsideMM(widget, BRSW_STATION_NE, BRSW_STATION_Y + 1)) return;
+ if (!IsInsideMM(widget, WID_BROS_STATION_NE, WID_BROS_STATION_Y + 1)) return;
StationType st = (this->window_class == WC_BUS_STATION) ? STATION_BUS : STATION_TRUCK;
- StationPickerDrawSprite(r.left + TILE_PIXELS, r.bottom - TILE_PIXELS, st, INVALID_RAILTYPE, widget < BRSW_STATION_X ? ROADTYPE_ROAD : _cur_roadtype, widget - BRSW_STATION_NE);
+ StationPickerDrawSprite(r.left + TILE_PIXELS, r.bottom - TILE_PIXELS, st, INVALID_RAILTYPE, widget < WID_BROS_STATION_X ? ROADTYPE_ROAD : _cur_roadtype, widget - WID_BROS_STATION_NE);
}
virtual void OnClick(Point pt, int widget, int click_count)
{
switch (widget) {
- case BRSW_STATION_NE:
- case BRSW_STATION_SE:
- case BRSW_STATION_SW:
- case BRSW_STATION_NW:
- case BRSW_STATION_X:
- case BRSW_STATION_Y:
- this->RaiseWidget(_road_station_picker_orientation + BRSW_STATION_NE);
- _road_station_picker_orientation = (DiagDirection)(widget - BRSW_STATION_NE);
- this->LowerWidget(_road_station_picker_orientation + BRSW_STATION_NE);
+ case WID_BROS_STATION_NE:
+ case WID_BROS_STATION_SE:
+ case WID_BROS_STATION_SW:
+ case WID_BROS_STATION_NW:
+ case WID_BROS_STATION_X:
+ case WID_BROS_STATION_Y:
+ this->RaiseWidget(_road_station_picker_orientation + WID_BROS_STATION_NE);
+ _road_station_picker_orientation = (DiagDirection)(widget - WID_BROS_STATION_NE);
+ this->LowerWidget(_road_station_picker_orientation + WID_BROS_STATION_NE);
SndPlayFx(SND_15_BEEP);
this->SetDirty();
DeleteWindowById(WC_SELECT_STATION, 0);
break;
- case BRSW_LT_OFF:
- case BRSW_LT_ON:
- this->RaiseWidget(_settings_client.gui.station_show_coverage + BRSW_LT_OFF);
- _settings_client.gui.station_show_coverage = (widget != BRSW_LT_OFF);
- this->LowerWidget(_settings_client.gui.station_show_coverage + BRSW_LT_OFF);
+ case WID_BROS_LT_OFF:
+ case WID_BROS_LT_ON:
+ this->RaiseWidget(_settings_client.gui.station_show_coverage + WID_BROS_LT_OFF);
+ _settings_client.gui.station_show_coverage = (widget != WID_BROS_LT_OFF);
+ this->LowerWidget(_settings_client.gui.station_show_coverage + WID_BROS_LT_OFF);
SndPlayFx(SND_15_BEEP);
this->SetDirty();
break;
@@ -1027,35 +1027,35 @@ struct BuildRoadStationWindow : public PickerWindowBase {
static const NWidgetPart _nested_rv_station_picker_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
- NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, BRSW_CAPTION),
+ NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_BROS_CAPTION),
EndContainer(),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BRSW_BACKGROUND),
+ NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_BROS_BACKGROUND),
NWidget(NWID_SPACER), SetMinimalSize(0, 3),
NWidget(NWID_HORIZONTAL), SetPIP(0, 2, 0),
NWidget(NWID_SPACER), SetFill(1, 0),
- NWidget(WWT_PANEL, COLOUR_GREY, BRSW_STATION_NW), SetMinimalSize(66, 50), EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY, BRSW_STATION_NE), SetMinimalSize(66, 50), EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY, BRSW_STATION_X), SetMinimalSize(66, 50), EndContainer(),
+ NWidget(WWT_PANEL, COLOUR_GREY, WID_BROS_STATION_NW), SetMinimalSize(66, 50), EndContainer(),
+ NWidget(WWT_PANEL, COLOUR_GREY, WID_BROS_STATION_NE), SetMinimalSize(66, 50), EndContainer(),
+ NWidget(WWT_PANEL, COLOUR_GREY, WID_BROS_STATION_X), SetMinimalSize(66, 50), EndContainer(),
NWidget(NWID_SPACER), SetFill(1, 0),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
NWidget(NWID_HORIZONTAL), SetPIP(0, 2, 0),
NWidget(NWID_SPACER), SetFill(1, 0),
- NWidget(WWT_PANEL, COLOUR_GREY, BRSW_STATION_SW), SetMinimalSize(66, 50), EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY, BRSW_STATION_SE), SetMinimalSize(66, 50), EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY, BRSW_STATION_Y), SetMinimalSize(66, 50), EndContainer(),
+ NWidget(WWT_PANEL, COLOUR_GREY, WID_BROS_STATION_SW), SetMinimalSize(66, 50), EndContainer(),
+ NWidget(WWT_PANEL, COLOUR_GREY, WID_BROS_STATION_SE), SetMinimalSize(66, 50), EndContainer(),
+ NWidget(WWT_PANEL, COLOUR_GREY, WID_BROS_STATION_Y), SetMinimalSize(66, 50), EndContainer(),
NWidget(NWID_SPACER), SetFill(1, 0),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 1),
NWidget(NWID_HORIZONTAL), SetPIP(2, 0, 2),
- NWidget(WWT_LABEL, COLOUR_DARK_GREEN, BRSW_INFO), SetMinimalSize(140, 14), SetDataTip(STR_STATION_BUILD_COVERAGE_AREA_TITLE, STR_NULL),
+ NWidget(WWT_LABEL, COLOUR_DARK_GREEN, WID_BROS_INFO), SetMinimalSize(140, 14), SetDataTip(STR_STATION_BUILD_COVERAGE_AREA_TITLE, STR_NULL),
NWidget(NWID_SPACER), SetFill(1, 0),
EndContainer(),
NWidget(NWID_HORIZONTAL), SetPIP(2, 0, 2),
NWidget(NWID_SPACER), SetFill(1, 0),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, BRSW_LT_OFF), SetMinimalSize(60, 12),
+ NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BROS_LT_OFF), SetMinimalSize(60, 12),
SetDataTip(STR_STATION_BUILD_COVERAGE_OFF, STR_STATION_BUILD_COVERAGE_AREA_OFF_TOOLTIP),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, BRSW_LT_ON), SetMinimalSize(60, 12),
+ NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BROS_LT_ON), SetMinimalSize(60, 12),
SetDataTip(STR_STATION_BUILD_COVERAGE_ON, STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP),
NWidget(NWID_SPACER), SetFill(1, 0),
EndContainer(),
diff --git a/src/widgets/road_widget.h b/src/widgets/road_widget.h
index 86454b3ee..bcfcb8e87 100644
--- a/src/widgets/road_widget.h
+++ b/src/widgets/road_widget.h
@@ -15,42 +15,42 @@
/** Widgets of the WC_SCEN_BUILD_TOOLBAR / WC_BUILD_TOOLBAR (WC_SCEN_BUILD_TOOLBAR / WC_BUILD_TOOLBAR is also used in others). */
enum RoadToolbarWidgets {
/* Name starts with RO instead of R, because 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,
+ WID_ROT_ROAD_X, ///< Build road in x-direction.
+ WID_ROT_ROAD_Y, ///< Build road in y-direction.
+ WID_ROT_AUTOROAD, ///< Autorail.
+ WID_ROT_DEMOLISH, ///< Demolish.
+ WID_ROT_DEPOT, ///< Build depot.
+ WID_ROT_BUS_STATION, ///< Build bus station.
+ WID_ROT_TRUCK_STATION, ///< Build truck station.
+ WID_ROT_ONE_WAY, ///< Build one-way road.
+ WID_ROT_BUILD_BRIDGE, ///< Build bridge.
+ WID_ROT_BUILD_TUNNEL, ///< Build tunnel.
+ WID_ROT_REMOVE, ///< Remove road.
};
/** Widgets of the WC_BUILD_DEPOT (WC_BUILD_DEPOT is also used in others). */
enum BuildRoadDepotWidgets {
/* Name starts with BRO instead of BR, because of collision with BuildRailDepotWidgets */
- BRODW_CAPTION,
- BRODW_DEPOT_NE,
- BRODW_DEPOT_SE,
- BRODW_DEPOT_SW,
- BRODW_DEPOT_NW,
+ WID_BROD_CAPTION, ///< Window caption.
+ WID_BROD_DEPOT_NE, ///< Depot with NE entry.
+ WID_BROD_DEPOT_SE, ///< Depot with SE entry.
+ WID_BROD_DEPOT_SW, ///< Depot with SW entry.
+ WID_BROD_DEPOT_NW, ///< Depot with NW entry.
};
/** Widgets of the WC_BUS_STATION / WC_TRUCK_STATION. */
enum BuildRoadStationWidgets {
- BRSW_CAPTION,
- BRSW_BACKGROUND,
- BRSW_STATION_NE,
- BRSW_STATION_SE,
- BRSW_STATION_SW,
- BRSW_STATION_NW,
- BRSW_STATION_X,
- BRSW_STATION_Y,
- BRSW_LT_OFF,
- BRSW_LT_ON,
- BRSW_INFO,
+ WID_BROS_CAPTION, ///< Window caption.
+ WID_BROS_BACKGROUND, ///< Window background.
+ WID_BROS_STATION_NE, ///< Terminal station with NE entry.
+ WID_BROS_STATION_SE, ///< Terminal station with SE entry.
+ WID_BROS_STATION_SW, ///< Terminal station with SW entry.
+ WID_BROS_STATION_NW, ///< Terminal station with NW entry.
+ WID_BROS_STATION_X, ///< Drive-through station in x-direction.
+ WID_BROS_STATION_Y, ///< Drive-through station in y-direction.
+ WID_BROS_LT_OFF, ///< Turn off area highlight.
+ WID_BROS_LT_ON, ///< Turn on area highlight.
+ WID_BROS_INFO, ///< Station acceptance info.
};
#endif /* WIDGETS_ROAD_WIDGET_H */