OpenTTD Source  1.11.0-beta2
road_gui.cpp File Reference
#include "stdafx.h"
#include "gui.h"
#include "window_gui.h"
#include "station_gui.h"
#include "terraform_gui.h"
#include "viewport_func.h"
#include "command_func.h"
#include "road_cmd.h"
#include "station_func.h"
#include "window_func.h"
#include "vehicle_func.h"
#include "sound_func.h"
#include "company_func.h"
#include "tunnelbridge.h"
#include "tunnelbridge_map.h"
#include "tilehighlight_func.h"
#include "company_base.h"
#include "hotkeys.h"
#include "road_gui.h"
#include "zoom_func.h"
#include "engine_base.h"
#include "strings_func.h"
#include "core/geometry_func.hpp"
#include "date_func.h"
#include "widgets/road_widget.h"
#include "table/strings.h"
#include "safeguards.h"

Go to the source code of this file.

Data Structures

struct  BuildRoadToolbarWindow
 Road toolbar window handler. More...
 
struct  BuildRoadDepotWindow
 
struct  BuildRoadStationWindow
 

Typedefs

typedef void OnButtonClick(Window *w)
 

Enumerations

enum  RoadFlags {
  RF_NONE = 0x00, RF_START_HALFROAD_Y = 0x01, RF_END_HALFROAD_Y = 0x02, RF_DIR_Y = 0x04,
  RF_DIR_X = RF_NONE, RF_START_HALFROAD_X = 0x08, RF_END_HALFROAD_X = 0x10
}
 Define the values of the RoadFlags. More...
 

Functions

static void ShowRVStationPicker (Window *parent, RoadStopType rs)
 
static void ShowRoadDepotPicker (Window *parent)
 
void CcPlaySound_CONSTRUCTION_OTHER (const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
 
static void PlaceRoad_Bridge (TileIndex tile, Window *w)
 Callback to start placing a bridge. More...
 
void CcBuildRoadTunnel (const CommandCost &result, TileIndex start_tile, uint32 p1, uint32 p2, uint32 cmd)
 Callback executed after a build road tunnel command has been called. More...
 
void ConnectRoadToStructure (TileIndex tile, DiagDirection direction)
 If required, connects a new structure to an existing road or tram by building the missing roadbit. More...
 
void CcRoadDepot (const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
 
void CcRoadStop (const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
 Command callback for building road stops. More...
 
static void PlaceRoadStop (TileIndex start_tile, TileIndex end_tile, uint32 p2, uint32 cmd)
 Place a new road stop. More...
 
static void PlaceRoad_BusStation (TileIndex tile)
 Callback for placing a bus station. More...
 
static void PlaceRoad_TruckStation (TileIndex tile)
 Callback for placing a truck station. More...
 
static void ToggleRoadButton_Remove (Window *w)
 Toggles state of the Remove button of Build road toolbar. More...
 
static bool RoadToolbar_CtrlChanged (Window *w)
 Updates the Remove button because of Ctrl state change. More...
 
static EventState RoadTramToolbarGlobalHotkeys (int hotkey, RoadType last_build, RoadTramType rtt)
 Handler for global hotkeys of the BuildRoadToolbarWindow. More...
 
static EventState RoadToolbarGlobalHotkeys (int hotkey)
 
static EventState TramToolbarGlobalHotkeys (int hotkey)
 
WindowShowBuildRoadToolbar (RoadType roadtype)
 Open the build road toolbar window. More...
 
WindowShowBuildRoadScenToolbar (RoadType roadtype)
 Show the road building toolbar in the scenario editor. More...
 
void InitializeRoadGui ()
 
void InitializeRoadGUI ()
 I really don't know why rail_gui.cpp has this too, shouldn't be included in the other one?
 
DropDownList GetRoadTypeDropDownList (RoadTramTypes rtts, bool for_replacement, bool all_option)
 
DropDownList GetScenRoadTypeDropDownList (RoadTramTypes rtts)
 

Variables

static bool _remove_button_clicked
 
static bool _one_way_button_clicked
 
static RoadFlags _place_road_flag
 
static RoadType _cur_roadtype
 
static DiagDirection _road_depot_orientation
 
static DiagDirection _road_station_picker_orientation
 
static Hotkey roadtoolbar_hotkeys []
 
static Hotkey tramtoolbar_hotkeys []
 
static const NWidgetPart _nested_build_road_widgets []
 
static WindowDesc _build_road_desc (WDP_ALIGN_TOOLBAR, "toolbar_road", 0, 0, WC_BUILD_TOOLBAR, WC_NONE, WDF_CONSTRUCTION, _nested_build_road_widgets, lengthof(_nested_build_road_widgets), &BuildRoadToolbarWindow::road_hotkeys)
 
static const NWidgetPart _nested_build_tramway_widgets []
 
static WindowDesc _build_tramway_desc (WDP_ALIGN_TOOLBAR, "toolbar_tramway", 0, 0, WC_BUILD_TOOLBAR, WC_NONE, WDF_CONSTRUCTION, _nested_build_tramway_widgets, lengthof(_nested_build_tramway_widgets), &BuildRoadToolbarWindow::tram_hotkeys)
 
static const NWidgetPart _nested_build_road_scen_widgets []
 
static WindowDesc _build_road_scen_desc (WDP_AUTO, "toolbar_road_scen", 0, 0, WC_SCEN_BUILD_TOOLBAR, WC_NONE, WDF_CONSTRUCTION, _nested_build_road_scen_widgets, lengthof(_nested_build_road_scen_widgets), &BuildRoadToolbarWindow::road_hotkeys)
 
static const NWidgetPart _nested_build_tramway_scen_widgets []
 
static WindowDesc _build_tramway_scen_desc (WDP_AUTO, "toolbar_tram_scen", 0, 0, WC_SCEN_BUILD_TOOLBAR, WC_NONE, WDF_CONSTRUCTION, _nested_build_tramway_scen_widgets, lengthof(_nested_build_tramway_scen_widgets), &BuildRoadToolbarWindow::tram_hotkeys)
 
static const NWidgetPart _nested_build_road_depot_widgets []
 
static WindowDesc _build_road_depot_desc (WDP_AUTO, nullptr, 0, 0, WC_BUILD_DEPOT, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, _nested_build_road_depot_widgets, lengthof(_nested_build_road_depot_widgets))
 
static const NWidgetPart _nested_road_station_picker_widgets []
 Widget definition of the build road station window.
 
static WindowDesc _road_station_picker_desc (WDP_AUTO, nullptr, 0, 0, WC_BUS_STATION, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, _nested_road_station_picker_widgets, lengthof(_nested_road_station_picker_widgets))
 
static const NWidgetPart _nested_tram_station_picker_widgets []
 Widget definition of the build tram station window. More...
 
static WindowDesc _tram_station_picker_desc (WDP_AUTO, nullptr, 0, 0, WC_BUS_STATION, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, _nested_tram_station_picker_widgets, lengthof(_nested_tram_station_picker_widgets))
 

Detailed Description

GUI for building roads.

Definition in file road_gui.cpp.

Enumeration Type Documentation

◆ RoadFlags

enum RoadFlags

Define the values of the RoadFlags.

See also
CmdBuildLongRoad

Definition at line 51 of file road_gui.cpp.

Function Documentation

◆ CcBuildRoadTunnel()

void CcBuildRoadTunnel ( const CommandCost result,
TileIndex  start_tile,
uint32  p1,
uint32  p2,
uint32  cmd 
)

Callback executed after a build road tunnel command has been called.

Parameters
resultWhether the build succeeded.
start_tileStarting tile of the tunnel.
p1bit 0-3 railtype or roadtypes bit 8-9 transport type
p2unused
cmdunused

Definition at line 99 of file road_gui.cpp.

References _settings_client, SoundSettings::confirm, ClientSettings::sound, and CommandCost::Succeeded().

◆ CcRoadStop()

void CcRoadStop ( const CommandCost result,
TileIndex  tile,
uint32  p1,
uint32  p2,
uint32  cmd 
)

Command callback for building road stops.

Parameters
resultResult of the build road stop command.
tileStart tile.
p1bit 0..7: Width of the road stop. bit 8..15: Length of the road stop.
p2bit 0: 0 For bus stops, 1 for truck stops. bit 1: 0 For normal stops, 1 for drive-through. bit 2: Allow stations directly adjacent to other stations. bit 3..4: Entrance direction (DiagDirection) for normal stops. bit 3: Axis of the road for drive-through stops. bit 5..9: The roadtype. bit 16..31: Station ID to join (NEW_STATION if build new one).
cmdUnused.
See also
CmdBuildRoadStop

Definition at line 158 of file road_gui.cpp.

References _settings_client, SoundSettings::confirm, CommandCost::Failed(), GB(), and ClientSettings::sound.

◆ ConnectRoadToStructure()

void ConnectRoadToStructure ( TileIndex  tile,
DiagDirection  direction 
)

If required, connects a new structure to an existing road or tram by building the missing roadbit.

Parameters
tileTile containing the structure to connect.
directionDirection to check.

Definition at line 121 of file road_gui.cpp.

References GetRoadBits(), IsNormalRoadTile(), TileInfo::tile, and TileOffsByDiagDir().

◆ PlaceRoad_Bridge()

static void PlaceRoad_Bridge ( TileIndex  tile,
Window w 
)
static

Callback to start placing a bridge.

Parameters
tileStart tile of the bridge.

Definition at line 78 of file road_gui.cpp.

References DDSP_BUILD_BRIDGE, GetOtherTunnelBridgeEnd(), IsBridgeTile(), Window::OnPlaceMouseUp(), TileInfo::tile, VPM_X_OR_Y, and VpStartPlaceSizing().

◆ PlaceRoad_BusStation()

static void PlaceRoad_BusStation ( TileIndex  tile)
static

Callback for placing a bus station.

Parameters
tilePosition to place the station.

Definition at line 203 of file road_gui.cpp.

References _remove_button_clicked, DDSP_REMOVE_BUSSTOP, TileInfo::tile, VPM_X_AND_Y, and VpStartPlaceSizing().

◆ PlaceRoad_TruckStation()

static void PlaceRoad_TruckStation ( TileIndex  tile)
static

Callback for placing a truck station.

Parameters
tilePosition to place the station.

Definition at line 221 of file road_gui.cpp.

References _remove_button_clicked, DDSP_REMOVE_TRUCKSTOP, TileInfo::tile, VPM_X_AND_Y, and VpStartPlaceSizing().

◆ PlaceRoadStop()

static void PlaceRoadStop ( TileIndex  start_tile,
TileIndex  end_tile,
uint32  p2,
uint32  cmd 
)
static

Place a new road stop.

Parameters
start_tileFirst tile of the area.
end_tileLast tile of the area.
p2bit 0: 0 For bus stops, 1 for truck stops. bit 2: Allow stations directly adjacent to other stations. bit 5..10: The roadtypes.
cmdCommand to use.
See also
CcRoadStop()

Definition at line 183 of file road_gui.cpp.

◆ RoadToolbar_CtrlChanged()

static bool RoadToolbar_CtrlChanged ( Window w)
static

Updates the Remove button because of Ctrl state change.

Parameters
wwindow the button belongs to
Returns
true iff the remove button was changed

Definition at line 254 of file road_gui.cpp.

References Window::IsWidgetDisabled(), Window::IsWidgetLowered(), ToggleRoadButton_Remove(), WID_ROT_AUTOROAD, WID_ROT_REMOVE, and WID_ROT_ROAD_X.

Referenced by BuildRoadToolbarWindow::OnCTRLStateChange().

◆ RoadTramToolbarGlobalHotkeys()

static EventState RoadTramToolbarGlobalHotkeys ( int  hotkey,
RoadType  last_build,
RoadTramType  rtt 
)
static

Handler for global hotkeys of the BuildRoadToolbarWindow.

Parameters
hotkeyHotkey
last_buildLast build road type
Returns
ES_HANDLED if hotkey was accepted.

Definition at line 730 of file road_gui.cpp.

◆ ShowBuildRoadScenToolbar()

Window* ShowBuildRoadScenToolbar ( RoadType  roadtype)

Show the road building toolbar in the scenario editor.

Returns
The just opened toolbar, or nullptr if the toolbar was already open.

Definition at line 975 of file road_gui.cpp.

References DeleteWindowById(), TRANSPORT_ROAD, and WC_SCEN_BUILD_TOOLBAR.

◆ ShowBuildRoadToolbar()

Window* ShowBuildRoadToolbar ( RoadType  roadtype)

Open the build road toolbar window.

If the terraform toolbar is linked to the toolbar, that window is also opened.

Returns
newly opened road toolbar, or nullptr if the toolbar could not be opened.

Definition at line 888 of file road_gui.cpp.

References _local_company, DeleteWindowByClass(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), ValParamRoadType(), and WC_BUILD_TOOLBAR.

◆ ToggleRoadButton_Remove()

static void ToggleRoadButton_Remove ( Window w)
static

Toggles state of the Remove button of Build road toolbar.

Parameters
wwindow the button belongs to

Definition at line 241 of file road_gui.cpp.

References _remove_button_clicked, Window::IsWidgetLowered(), Window::SetWidgetDirty(), Window::ToggleWidgetLoweredState(), and WID_ROT_REMOVE.

Referenced by RoadToolbar_CtrlChanged().

Variable Documentation

◆ _nested_build_road_depot_widgets

const NWidgetPart _nested_build_road_depot_widgets[]
static
Initial value:
= {
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_BROD_CAPTION), SetDataTip(STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PANEL, COLOUR_DARK_GREEN),
NWidget(WWT_PANEL, COLOUR_GREY, WID_BROD_DEPOT_NW), 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),
NWidget(WWT_PANEL, COLOUR_GREY, WID_BROD_DEPOT_NE), 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),
}

Definition at line 1032 of file road_gui.cpp.

◆ _nested_build_road_scen_widgets

const NWidgetPart _nested_build_road_scen_widgets[]
static
Initial value:
= {
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_ROT_CAPTION), SetDataTip(STR_WHITE_STRING, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
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, 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, 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, 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, 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, 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, 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, WID_ROT_REMOVE),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_REMOVE, STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD),
NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_CONVERT_ROAD),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_CONVERT_ROAD, STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_ROAD),
}

Definition at line 899 of file road_gui.cpp.

◆ _nested_build_tramway_scen_widgets

const NWidgetPart _nested_build_tramway_scen_widgets[]
static
Initial value:
= {
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_ROT_CAPTION), SetDataTip(STR_WHITE_STRING, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
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, 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, 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, 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, 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, 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, WID_ROT_REMOVE),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_REMOVE, STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS),
NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_CONVERT_ROAD),
SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_CONVERT_ROAD, STR_ROAD_TOOLBAR_TOOLTIP_CONVERT_TRAM),
}

Definition at line 936 of file road_gui.cpp.

◆ _nested_tram_station_picker_widgets

const NWidgetPart _nested_tram_station_picker_widgets[]
static
Initial value:
= {
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_BROS_CAPTION),
NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_BROS_BACKGROUND),
NWidget(WWT_LABEL, COLOUR_DARK_GREEN, WID_BROS_INFO), SetMinimalSize(140, 14), SetDataTip(STR_STATION_BUILD_COVERAGE_AREA_TITLE, STR_NULL),
SetDataTip(STR_STATION_BUILD_COVERAGE_OFF, STR_STATION_BUILD_COVERAGE_AREA_OFF_TOOLTIP),
SetDataTip(STR_STATION_BUILD_COVERAGE_ON, STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP),
}

Widget definition of the build tram station window.

Definition at line 1232 of file road_gui.cpp.

◆ roadtoolbar_hotkeys

Hotkey roadtoolbar_hotkeys[]
static
Initial value:
= {
Hotkey('1', "build_x", WID_ROT_ROAD_X),
Hotkey('2', "build_y", WID_ROT_ROAD_Y),
Hotkey('3', "autoroad", WID_ROT_AUTOROAD),
Hotkey('4', "demolish", WID_ROT_DEMOLISH),
Hotkey('5', "depot", WID_ROT_DEPOT),
Hotkey('6', "bus_station", WID_ROT_BUS_STATION),
Hotkey('7', "truck_station", WID_ROT_TRUCK_STATION),
Hotkey('8', "oneway", WID_ROT_ONE_WAY),
Hotkey('B', "bridge", WID_ROT_BUILD_BRIDGE),
Hotkey('T', "tunnel", WID_ROT_BUILD_TUNNEL),
Hotkey('R', "remove", WID_ROT_REMOVE),
Hotkey('C', "convert", WID_ROT_CONVERT_ROAD),
HOTKEY_LIST_END
}

Definition at line 763 of file road_gui.cpp.

◆ tramtoolbar_hotkeys

Hotkey tramtoolbar_hotkeys[]
static
Initial value:
= {
Hotkey('1', "build_x", WID_ROT_ROAD_X),
Hotkey('2', "build_y", WID_ROT_ROAD_Y),
Hotkey('3', "autoroad", WID_ROT_AUTOROAD),
Hotkey('4', "demolish", WID_ROT_DEMOLISH),
Hotkey('5', "depot", WID_ROT_DEPOT),
Hotkey('6', "bus_station", WID_ROT_BUS_STATION),
Hotkey('7', "truck_station", WID_ROT_TRUCK_STATION),
Hotkey('B', "bridge", WID_ROT_BUILD_BRIDGE),
Hotkey('T', "tunnel", WID_ROT_BUILD_TUNNEL),
Hotkey('R', "remove", WID_ROT_REMOVE),
Hotkey('C', "convert", WID_ROT_CONVERT_ROAD),
HOTKEY_LIST_END
}

Definition at line 780 of file road_gui.cpp.

WID_ROT_REMOVE
@ WID_ROT_REMOVE
Remove road.
Definition: road_widget.h:27
WWT_STICKYBOX
@ WWT_STICKYBOX
Sticky box (at top-right of a window, after WWT_DEFSIZEBOX)
Definition: widget_type.h:64
WID_BROS_INFO
@ WID_BROS_INFO
Station acceptance info.
Definition: road_widget.h:54
WWT_CAPTION
@ WWT_CAPTION
Window caption (window title between closebox and stickybox)
Definition: widget_type.h:59
WWT_IMGBTN
@ WWT_IMGBTN
(Toggle) Button with image
Definition: widget_type.h:50
WWT_LABEL
@ WWT_LABEL
Centered label.
Definition: widget_type.h:55
WID_ROT_BUILD_TUNNEL
@ WID_ROT_BUILD_TUNNEL
Build tunnel.
Definition: road_widget.h:26
WID_BROD_CAPTION
@ WID_BROD_CAPTION
Caption of the window.
Definition: road_widget.h:34
NWID_HORIZONTAL
@ NWID_HORIZONTAL
Horizontal container.
Definition: widget_type.h:73
NWID_HORIZONTAL_LTR
@ NWID_HORIZONTAL_LTR
Horizontal container that doesn't change the order of the widgets for RTL languages.
Definition: widget_type.h:74
SetResize
static NWidgetPart SetResize(int16 dx, int16 dy)
Widget part function for setting the resize step.
Definition: widget_type.h:929
WID_BROS_STATION_Y
@ WID_BROS_STATION_Y
Drive-through station in y-direction.
Definition: road_widget.h:51
WID_BROS_LT_ON
@ WID_BROS_LT_ON
Turn on area highlight.
Definition: road_widget.h:53
SetDataTip
static NWidgetPart SetDataTip(uint32 data, StringID tip)
Widget part function for setting the data and tooltip.
Definition: widget_type.h:1013
WID_BROS_BACKGROUND
@ WID_BROS_BACKGROUND
Background of the window.
Definition: road_widget.h:45
WID_BROS_STATION_X
@ WID_BROS_STATION_X
Drive-through station in x-direction.
Definition: road_widget.h:50
WID_ROT_CAPTION
@ WID_ROT_CAPTION
Caption of the window.
Definition: road_widget.h:16
WID_ROT_ROAD_Y
@ WID_ROT_ROAD_Y
Build road in y-direction.
Definition: road_widget.h:18
WID_ROT_BUILD_BRIDGE
@ WID_ROT_BUILD_BRIDGE
Build bridge.
Definition: road_widget.h:25
NWID_VERTICAL
@ NWID_VERTICAL
Vertical container.
Definition: widget_type.h:75
WID_ROT_TRUCK_STATION
@ WID_ROT_TRUCK_STATION
Build truck station.
Definition: road_widget.h:23
WID_BROD_DEPOT_SW
@ WID_BROD_DEPOT_SW
Depot with SW entry.
Definition: road_widget.h:37
WWT_CLOSEBOX
@ WWT_CLOSEBOX
Close box (at top-left of a window)
Definition: widget_type.h:67
WID_ROT_ONE_WAY
@ WID_ROT_ONE_WAY
Build one-way road.
Definition: road_widget.h:24
EndContainer
static NWidgetPart EndContainer()
Widget part function for denoting the end of a container (horizontal, vertical, WWT_FRAME,...
Definition: widget_type.h:998
WID_BROD_DEPOT_NW
@ WID_BROD_DEPOT_NW
Depot with NW entry.
Definition: road_widget.h:38
NWidget
static NWidgetPart NWidget(WidgetType tp, Colours col, int16 idx=-1)
Widget part function for starting a new 'real' widget.
Definition: widget_type.h:1113
SetMinimalSize
static NWidgetPart SetMinimalSize(int16 x, int16 y)
Widget part function for setting the minimal size.
Definition: widget_type.h:946
WWT_PANEL
@ WWT_PANEL
Simple depressed panel.
Definition: widget_type.h:48
WID_ROT_CONVERT_ROAD
@ WID_ROT_CONVERT_ROAD
Convert road.
Definition: road_widget.h:28
WID_ROT_ROAD_X
@ WID_ROT_ROAD_X
Build road in x-direction.
Definition: road_widget.h:17
WID_ROT_DEPOT
@ WID_ROT_DEPOT
Build depot.
Definition: road_widget.h:21
WID_BROD_DEPOT_SE
@ WID_BROD_DEPOT_SE
Depot with SE entry.
Definition: road_widget.h:36
WID_BROS_CAPTION
@ WID_BROS_CAPTION
Caption of the window.
Definition: road_widget.h:44
NWID_SPACER
@ NWID_SPACER
Invisible widget that takes some space.
Definition: widget_type.h:77
WID_ROT_BUS_STATION
@ WID_ROT_BUS_STATION
Build bus station.
Definition: road_widget.h:22
SetPIP
static NWidgetPart SetPIP(uint8 pre, uint8 inter, uint8 post)
Widget part function for setting a pre/inter/post spaces.
Definition: widget_type.h:1075
SetFill
static NWidgetPart SetFill(uint fill_x, uint fill_y)
Widget part function for setting filling.
Definition: widget_type.h:982
WID_ROT_AUTOROAD
@ WID_ROT_AUTOROAD
Autorail.
Definition: road_widget.h:19
WID_ROT_DEMOLISH
@ WID_ROT_DEMOLISH
Demolish.
Definition: road_widget.h:20
WID_BROS_LT_OFF
@ WID_BROS_LT_OFF
Turn off area highlight.
Definition: road_widget.h:52
WWT_TEXTBTN
@ WWT_TEXTBTN
(Toggle) Button with text
Definition: widget_type.h:53
Hotkey
All data for a single hotkey.
Definition: hotkeys.h:22
WID_BROD_DEPOT_NE
@ WID_BROD_DEPOT_NE
Depot with NE entry.
Definition: road_widget.h:35