# road_gui.cpp File Reference

`#include "stdafx.h"`
`#include "openttd.h"`
`#include "gui.h"`
`#include "window_gui.h"`
`#include "station_gui.h"`
`#include "terraform_gui.h"`
`#include "viewport_func.h"`
`#include "gfx_func.h"`
`#include "command_func.h"`
`#include "variables.h"`
`#include "road_type.h"`
`#include "road_cmd.h"`
`#include "road_map.h"`
`#include "station_map.h"`
`#include "station.h"`
`#include "functions.h"`
`#include "window_func.h"`
`#include "vehicle_func.h"`
`#include "sound_func.h"`
`#include "player_func.h"`
`#include "settings_type.h"`
`#include "table/sprites.h"`
`#include "table/strings.h"`

Go to the source code of this file.

## Data Structures
struct | RoadTypeInfo
| Structure holding information per roadtype for several functions. More...
## 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...
enum | RoadToolbarWidgets { RTW_CLOSEBOX = 0, RTW_CAPTION, RTW_STICKY, 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 }
| Enum referring to the widgets of the build road toolbar.
enum | BuildRoadDepotWidgets { BRDW_CLOSEBOX = 0, BRDW_CAPTION, BRDW_BACKGROUND, BRDW_DEPOT_NE, BRDW_DEPOT_SE, BRDW_DEPOT_SW, BRDW_DEPOT_NW }
| Enum referring to the widgets of the build road depot window.
enum | BuildRoadStationWidgets { BRSW_CLOSEBOX = 0, 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 }
| Enum referring to the widgets of the build road station window.
## Functions
static void | ShowRVStationPicker (RoadStop::Type rs)
static void | ShowRoadDepotPicker ()
| DECLARE_ENUM_AS_BIT_SET (RoadFlags)
void | CcPlaySound1D (bool success, TileIndex tile, uint32 p1, uint32 p2)
static void | PlaceRoad_X_Dir (TileIndex tile)
| Set the initial flags for the road constuction.
static void | PlaceRoad_Y_Dir (TileIndex tile)
| Set the initial flags for the road constuction.
static void | PlaceRoad_AutoRoad (TileIndex tile)
| Set the initial flags for the road constuction.
static void | PlaceRoad_Bridge (TileIndex tile)
void | CcBuildRoadTunnel (bool success, TileIndex tile, uint32 p1, uint32 p2)
static void | PlaceRoad_Tunnel (TileIndex tile)
static void | BuildRoadOutsideStation (TileIndex tile, DiagDirection direction)
void | CcRoadDepot (bool success, TileIndex tile, uint32 p1, uint32 p2)
static void | PlaceRoad_Depot (TileIndex tile)
static void | PlaceRoadStop (TileIndex tile, uint32 p2, uint32 cmd)
static void | PlaceRoad_BusStation (TileIndex tile)
static void | PlaceRoad_TruckStation (TileIndex tile)
static void | PlaceRoad_DemolishArea (TileIndex tile)
static void | ToggleRoadButton_Remove (Window *w)
| Toogles state of the Remove button of Build road toolbar.
static bool | RoadToolbar_CtrlChanged (Window *w)
| Updates the Remove button because of Ctrl state change.
static void | BuildRoadClick_X_Dir (Window *w)
| Function that handles the click on the X road placement button.
static void | BuildRoadClick_Y_Dir (Window *w)
| Function that handles the click on the Y road placement button.
static void | BuildRoadClick_AutoRoad (Window *w)
| Function that handles the click on the autoroad placement button.
static void | BuildRoadClick_Demolish (Window *w)
static void | BuildRoadClick_Depot (Window *w)
static void | BuildRoadClick_BusStation (Window *w)
static void | BuildRoadClick_TruckStation (Window *w)
static void | BuildRoadClick_OneWay (Window *w)
| Function that handles the click on the one way road button.
static void | BuildRoadClick_Bridge (Window *w)
static void | BuildRoadClick_Tunnel (Window *w)
static void | BuildRoadClick_Remove (Window *w)
static void | UpdateOptionWidgetStatus (Window *w, int clicked_widget)
| Update the remove button lowered state of the road toolbar.
static void | BuildRoadToolbWndProc (Window *w, WindowEvent *e)
void | ShowBuildRoadToolbar (RoadType roadtype)
void | ShowBuildRoadScenToolbar ()
static void | BuildRoadDepotWndProc (Window *w, WindowEvent *e)
static void | RoadStationPickerWndProc (Window *w, WindowEvent *e)
void | InitializeRoadGui ()
## 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 const RoadTypeInfo | _road_type_infos []
| What errors/cursors must be shown for several types of roads.
static OnButtonClick *const | _build_road_button_proc []
| Array with the handlers of the button-clicks for the road-toolbar.
static const uint16 | _road_keycodes []
| Array with the keycode of the button-clicks for the road-toolbar.
static const Widget | _build_road_widgets []
| Widget definition of the build road toolbar.
static const WindowDesc | _build_road_desc
static const Widget | _build_tramway_widgets []
| Widget definition of the build tram toolbar.
static const WindowDesc | _build_tramway_desc
static const Widget | _build_road_scen_widgets []
| Widget definition of the build road toolbar in the scenario editor.
static const WindowDesc | _build_road_scen_desc
static const Widget | _build_road_depot_widgets []
| Widget definition of the build road depot window.
static const Widget | _build_tram_depot_widgets []
| Widget definition of the build tram depot window.
static const WindowDesc | _build_road_depot_desc
static const WindowDesc | _build_tram_depot_desc
static const Widget | _rv_station_picker_widgets []
| Widget definition of the build raod station window.
static const WindowDesc | _rv_station_picker_desc

## Detailed Description

Definition in file road_gui.cpp.

## Enumeration Type Documentation

enum RoadFlags

Define the values of the RoadFlags.

See also:
  CmdBuildLongRoad

Definition at line 40 of file road_gui.cpp.

## Function Documentation

static void BuildRoadClick_AutoRoad | ( | Window * | w | ) | `[static]`

Function that handles the click on the autoroad placement button.

Parameters:

  | w | The current window

Definition at line 318 of file road_gui.cpp.

References HandlePlacePushButton(), PlaceRoad_AutoRoad(), and VHM_RECT.

static void BuildRoadClick_OneWay | ( | Window * | w | ) | `[static]`

Function that handles the click on the one way road button.

Parameters:

  | w | The current window

Definition at line 352 of file road_gui.cpp.

References SetWindowDirty().

static void BuildRoadClick_X_Dir | ( | Window * | w | ) | `[static]`

Function that handles the click on the X road placement button.

Parameters:

  | w | The current window

Definition at line 296 of file road_gui.cpp.

References HandlePlacePushButton(), PlaceRoad_X_Dir(), and VHM_RECT.

static void BuildRoadClick_Y_Dir | ( | Window * | w | ) | `[static]`

Function that handles the click on the Y road placement button.

Parameters:

  | w | The current window

Definition at line 307 of file road_gui.cpp.

References HandlePlacePushButton(), PlaceRoad_Y_Dir(), and VHM_RECT.

static void PlaceRoad_AutoRoad | ( | TileIndex | tile | ) | `[static]`

Set the initial flags for the road constuction.

The flags are:

- The direction is not set.
- The first tile has a partitial RoadBit (true or false)

Parameters:

  | tile | The start tile

Definition at line 101 of file road_gui.cpp.

References VPM_X_OR_Y, and VpStartPlaceSizing().

Referenced by BuildRoadClick_AutoRoad().

static void PlaceRoad_X_Dir | ( | TileIndex | tile | ) | `[static]`

Set the initial flags for the road constuction.

The flags are:

- The direction is the X-dir
- The first tile has a partitial RoadBit (true or false)

Parameters:

  | tile | The start tile

Definition at line 71 of file road_gui.cpp.

References VPM_FIX_Y, and VpStartPlaceSizing().

Referenced by BuildRoadClick_X_Dir().

static void PlaceRoad_Y_Dir | ( | TileIndex | tile | ) | `[static]`

Set the initial flags for the road constuction.

The flags are:

- The direction is the Y-dir
- The first tile has a partitial RoadBit (true or false)

Parameters:

  | tile | The start tile

Definition at line 86 of file road_gui.cpp.

References VPM_FIX_X, and VpStartPlaceSizing().

Referenced by BuildRoadClick_Y_Dir().

static bool RoadToolbar_CtrlChanged | ( | Window * | w | ) | `[static]`

Updates the Remove button because of Ctrl state change.

Parameters:

  | w | window the button belongs to

Returns:
  true iff the remove buton was changed

Definition at line 274 of file road_gui.cpp.

References ToggleRoadButton_Remove().

static void ToggleRoadButton_Remove | ( | Window * | w | ) | `[static]`

Toogles state of the Remove button of Build road toolbar.

Parameters:

  | w | window the button belongs to

Definition at line 262 of file road_gui.cpp.

Referenced by RoadToolbar_CtrlChanged().

static void UpdateOptionWidgetStatus | ( | Window * | w,
|  | int | clicked_widget |
| ) |  |  | `[static]`

Update the remove button lowered state of the road toolbar.

Parameters:

  | w | The toolbar window
  | clicked_widget | The widget which the player clicked just now

Definition at line 413 of file road_gui.cpp.

References WIDGET_LIST_END.

## Variable Documentation

OnButtonClick* const _build_road_button_proc[]`[static]`

Initial value:

     {
      BuildRoadClick_X_Dir,
      BuildRoadClick_Y_Dir,
      BuildRoadClick_AutoRoad,
      BuildRoadClick_Demolish,
      BuildRoadClick_Depot,
      BuildRoadClick_BusStation,
      BuildRoadClick_TruckStation,
      BuildRoadClick_OneWay,
      BuildRoadClick_Bridge,
      BuildRoadClick_Tunnel,
      BuildRoadClick_Remove
    }

Array with the handlers of the button-clicks for the road-toolbar.

Definition at line 378 of file road_gui.cpp.

const WindowDesc _build_road_depot_desc`[static]`

Initial value:

     {
      WDP_AUTO, WDP_AUTO, 140, 122, 140, 122,
      WC_BUILD_DEPOT, WC_BUILD_TOOLBAR,
      WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
      _build_road_depot_widgets,
      BuildRoadDepotWndProc
    }

Definition at line 788 of file road_gui.cpp.

const Widget _build_road_depot_widgets[]`[static]`

Initial value:

     {
    {   WWT_CLOSEBOX,   RESIZE_NONE,     7,     0,    10,     0,    13, STR_00C5,                        STR_018B_CLOSE_WINDOW},
    {    WWT_CAPTION,   RESIZE_NONE,     7,    11,   139,     0,    13, STR_1806_ROAD_DEPOT_ORIENTATION, STR_018C_WINDOW_TITLE_DRAG_THIS},
    {      WWT_PANEL,   RESIZE_NONE,     7,     0,   139,    14,   121, 0x0,                             STR_NULL},
    {      WWT_PANEL,   RESIZE_NONE,    14,    71,   136,    17,    66, 0x0,                             STR_1813_SELECT_ROAD_VEHICLE_DEPOT},
    {      WWT_PANEL,   RESIZE_NONE,    14,    71,   136,    69,   118, 0x0,                             STR_1813_SELECT_ROAD_VEHICLE_DEPOT},
    {      WWT_PANEL,   RESIZE_NONE,    14,     3,    68,    69,   118, 0x0,                             STR_1813_SELECT_ROAD_VEHICLE_DEPOT},
    {      WWT_PANEL,   RESIZE_NONE,    14,     3,    68,    17,    66, 0x0,                             STR_1813_SELECT_ROAD_VEHICLE_DEPOT},
    {   WIDGETS_END},
    }

Widget definition of the build road depot window.

Definition at line 765 of file road_gui.cpp.

const WindowDesc _build_road_desc`[static]`

Initial value:

     {
      WDP_ALIGN_TBR, 22, 263, 36, 263, 36,
      WC_BUILD_TOOLBAR, WC_NONE,
      WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON,
      _build_road_widgets,
      BuildRoadToolbWndProc
    }

Definition at line 633 of file road_gui.cpp.

const WindowDesc _build_road_scen_desc`[static]`

Initial value:

     {
      WDP_AUTO, WDP_AUTO, 197, 36, 197, 36,
      WC_SCEN_BUILD_ROAD, WC_NONE,
      WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON,
      _build_road_scen_widgets,
      BuildRoadToolbWndProc
    }

Definition at line 700 of file road_gui.cpp.

const Widget _build_road_scen_widgets[]`[static]`

Initial value:

     {
    {   WWT_CLOSEBOX,   RESIZE_NONE,     7,     0,    10,     0,    13, STR_00C5,                   STR_018B_CLOSE_WINDOW},
    {    WWT_CAPTION,   RESIZE_NONE,     7,    11,   184,     0,    13, STR_1802_ROAD_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS},
    {  WWT_STICKYBOX,   RESIZE_NONE,     7,   185,   196,     0,    13, 0x0,                        STR_STICKY_BUTTON},

    {     WWT_IMGBTN,   RESIZE_NONE,     7,     0,    21,    14,    35, SPR_IMG_ROAD_X_DIR,         STR_180B_BUILD_ROAD_SECTION},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,    22,    43,    14,    35, SPR_IMG_ROAD_Y_DIR,         STR_180B_BUILD_ROAD_SECTION},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,    44,    65,    14,    35, SPR_IMG_AUTOROAD,           STR_BUILD_AUTOROAD_TIP},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,    66,    87,    14,    35, SPR_IMG_DYNAMITE,           STR_018D_DEMOLISH_BUILDINGS_ETC},
    {      WWT_EMPTY,   RESIZE_NONE,     0,     0,     0,     0,     0, 0x0,                        STR_NULL},
    {      WWT_EMPTY,   RESIZE_NONE,     0,     0,     0,     0,     0, 0x0,                        STR_NULL},
    {      WWT_EMPTY,   RESIZE_NONE,     0,     0,     0,     0,     0, 0x0,                        STR_NULL},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,    88,   109,    14,    35, SPR_IMG_ROAD_ONE_WAY,       STR_TOGGLE_ONE_WAY_ROAD},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,   110,   152,    14,    35, SPR_IMG_BRIDGE,             STR_180F_BUILD_ROAD_BRIDGE},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,   153,   174,    14,    35, SPR_IMG_ROAD_TUNNEL,        STR_1810_BUILD_ROAD_TUNNEL},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,   175,   196,    14,    35, SPR_IMG_REMOVE,             STR_1811_TOGGLE_BUILD_REMOVE_FOR},
    {   WIDGETS_END},
    }

Widget definition of the build road toolbar in the scenario editor.

Definition at line 681 of file road_gui.cpp.

const Widget _build_road_widgets[]`[static]`

Initial value:

     {
    {   WWT_CLOSEBOX,   RESIZE_NONE,     7,     0,    10,     0,    13, STR_00C5,                   STR_018B_CLOSE_WINDOW},
    {    WWT_CAPTION,   RESIZE_NONE,     7,    11,   250,     0,    13, STR_1802_ROAD_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS},
    {  WWT_STICKYBOX,   RESIZE_NONE,     7,   251,   262,     0,    13, 0x0,                        STR_STICKY_BUTTON},

    {     WWT_IMGBTN,   RESIZE_NONE,     7,     0,    21,    14,    35, SPR_IMG_ROAD_X_DIR,         STR_180B_BUILD_ROAD_SECTION},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,    22,    43,    14,    35, SPR_IMG_ROAD_Y_DIR,         STR_180B_BUILD_ROAD_SECTION},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,    44,    65,    14,    35, SPR_IMG_AUTOROAD,           STR_BUILD_AUTOROAD_TIP},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,    66,    87,    14,    35, SPR_IMG_DYNAMITE,           STR_018D_DEMOLISH_BUILDINGS_ETC},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,    88,   109,    14,    35, SPR_IMG_ROAD_DEPOT,         STR_180C_BUILD_ROAD_VEHICLE_DEPOT},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,   110,   131,    14,    35, SPR_IMG_BUS_STATION,        STR_180D_BUILD_BUS_STATION},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,   132,   153,    14,    35, SPR_IMG_TRUCK_BAY,          STR_180E_BUILD_TRUCK_LOADING_BAY},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,   154,   175,    14,    35, SPR_IMG_ROAD_ONE_WAY,       STR_TOGGLE_ONE_WAY_ROAD},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,   176,   218,    14,    35, SPR_IMG_BRIDGE,             STR_180F_BUILD_ROAD_BRIDGE},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,   219,   240,    14,    35, SPR_IMG_ROAD_TUNNEL,        STR_1810_BUILD_ROAD_TUNNEL},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,   241,   262,    14,    35, SPR_IMG_REMOVE,             STR_1811_TOGGLE_BUILD_REMOVE_FOR},

    {   WIDGETS_END},
    }

Widget definition of the build road toolbar.

Definition at line 613 of file road_gui.cpp.

const WindowDesc _build_tram_depot_desc`[static]`

Initial value:

     {
      WDP_AUTO, WDP_AUTO, 140, 122, 140, 122,
      WC_BUILD_DEPOT, WC_BUILD_TOOLBAR,
      WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
      _build_tram_depot_widgets,
      BuildRoadDepotWndProc
    }

Definition at line 796 of file road_gui.cpp.

const Widget _build_tram_depot_widgets[]`[static]`

Initial value:

     {
    {   WWT_CLOSEBOX,   RESIZE_NONE,     7,     0,    10,     0,    13, STR_00C5,                        STR_018B_CLOSE_WINDOW},
    {    WWT_CAPTION,   RESIZE_NONE,     7,    11,   139,     0,    13, STR_TRAM_DEPOT_ORIENTATION,      STR_018C_WINDOW_TITLE_DRAG_THIS},
    {      WWT_PANEL,   RESIZE_NONE,     7,     0,   139,    14,   121, 0x0,                             STR_NULL},
    {      WWT_PANEL,   RESIZE_NONE,    14,    71,   136,    17,    66, 0x0,                             STR_SELECT_TRAM_VEHICLE_DEPOT},
    {      WWT_PANEL,   RESIZE_NONE,    14,    71,   136,    69,   118, 0x0,                             STR_SELECT_TRAM_VEHICLE_DEPOT},
    {      WWT_PANEL,   RESIZE_NONE,    14,     3,    68,    69,   118, 0x0,                             STR_SELECT_TRAM_VEHICLE_DEPOT},
    {      WWT_PANEL,   RESIZE_NONE,    14,     3,    68,    17,    66, 0x0,                             STR_SELECT_TRAM_VEHICLE_DEPOT},
    {   WIDGETS_END},
    }

Widget definition of the build tram depot window.

Definition at line 777 of file road_gui.cpp.

const WindowDesc _build_tramway_desc`[static]`

Initial value:

     {
      WDP_ALIGN_TBR, 22, 241, 36, 241, 36,
      WC_BUILD_TOOLBAR, WC_NONE,
      WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON,
      _build_tramway_widgets,
      BuildRoadToolbWndProc
    }

Definition at line 662 of file road_gui.cpp.

const Widget _build_tramway_widgets[]`[static]`

Initial value:

     {
    {   WWT_CLOSEBOX,   RESIZE_NONE,     7,     0,    10,     0,    13, STR_00C5,                       STR_018B_CLOSE_WINDOW},
    {    WWT_CAPTION,   RESIZE_NONE,     7,    11,   228,     0,    13, STR_WHITE_TRAMWAY_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS},
    {  WWT_STICKYBOX,   RESIZE_NONE,     7,   229,   240,     0,    13, 0x0,                            STR_STICKY_BUTTON},

    {     WWT_IMGBTN,   RESIZE_NONE,     7,     0,    21,    14,    35, SPR_IMG_TRAMWAY_X_DIR,          STR_BUILD_TRAMWAY_SECTION},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,    22,    43,    14,    35, SPR_IMG_TRAMWAY_Y_DIR,          STR_BUILD_TRAMWAY_SECTION},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,    44,    65,    14,    35, SPR_IMG_AUTOTRAM,               STR_BUILD_AUTOTRAM_TIP},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,    66,    87,    14,    35, SPR_IMG_DYNAMITE,               STR_018D_DEMOLISH_BUILDINGS_ETC},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,    88,   109,    14,    35, SPR_IMG_ROAD_DEPOT,             STR_BUILD_TRAM_VEHICLE_DEPOT},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,   110,   131,    14,    35, SPR_IMG_BUS_STATION,            STR_BUILD_PASSENGER_TRAM_STATION},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,   132,   153,    14,    35, SPR_IMG_TRUCK_BAY,              STR_BUILD_CARGO_TRAM_STATION},
    {      WWT_EMPTY,   RESIZE_NONE,     0,     0,     0,     0,     0, 0x0,                            STR_NULL},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,   154,   196,    14,    35, SPR_IMG_BRIDGE,                 STR_BUILD_TRAMWAY_BRIDGE},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,   197,   218,    14,    35, SPR_IMG_ROAD_TUNNEL,            STR_BUILD_TRAMWAY_TUNNEL},
    {     WWT_IMGBTN,   RESIZE_NONE,     7,   219,   240,    14,    35, SPR_IMG_REMOVE,                 STR_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS},

    {   WIDGETS_END},
    }

Widget definition of the build tram toolbar.

Definition at line 642 of file road_gui.cpp.

const uint16 _road_keycodes[]`[static]`

Initial value:

     {
      '1',
      '2',
      '3',
      '4',
      '5',
      '6',
      '7',
      '8',
      'B',
      'T',
      'R',
    }

Array with the keycode of the button-clicks for the road-toolbar.

Definition at line 393 of file road_gui.cpp.

const RoadTypeInfo _road_type_infos[]`[static]`

Initial value:

     {
      {
        STR_1804_CAN_T_BUILD_ROAD_HERE,
        STR_1805_CAN_T_REMOVE_ROAD_FROM,
        STR_1807_CAN_T_BUILD_ROAD_VEHICLE,
        { STR_1808_CAN_T_BUILD_BUS_STATION,        STR_1809_CAN_T_BUILD_TRUCK_STATION },
        { STR_CAN_T_REMOVE_BUS_STATION,            STR_CAN_T_REMOVE_TRUCK_STATION     },
        { STR_3042_BUS_STATION_ORIENTATION,        STR_3043_TRUCK_STATION_ORIENT      },
        { STR_3051_SELECT_BUS_STATION_ORIENTATION, STR_3052_SELECT_TRUCK_LOADING_BAY  },

        SPR_CURSOR_ROAD_NESW,
        SPR_CURSOR_ROAD_NWSE,
        SPR_CURSOR_AUTOROAD,
      },
      {
        STR_CAN_T_BUILD_TRAMWAY_HERE,
        STR_CAN_T_REMOVE_TRAMWAY_FROM,
        STR_CAN_T_BUILD_TRAM_VEHICLE,
        { STR_CAN_T_BUILD_PASSENGER_TRAM_STATION,        STR_CAN_T_BUILD_CARGO_TRAM_STATION        },
        { STR_CAN_T_REMOVE_PASSENGER_TRAM_STATION,       STR_CAN_T_REMOVE_CARGO_TRAM_STATION       },
        { STR_PASSENGER_TRAM_STATION_ORIENTATION,        STR_CARGO_TRAM_STATION_ORIENT             },
        { STR_SELECT_PASSENGER_TRAM_STATION_ORIENTATION, STR_SELECT_CARGO_TRAM_STATION_ORIENTATION },

        SPR_CURSOR_TRAMWAY_NESW,
        SPR_CURSOR_TRAMWAY_NWSE,
        SPR_CURSOR_AUTOTRAM,
      },
    }

What errors/cursors must be shown for several types of roads.

Definition at line 142 of file road_gui.cpp.

const WindowDesc _rv_station_picker_desc`[static]`

Initial value:

     {
      WDP_AUTO, WDP_AUTO, 207, 177, 207, 177,
      WC_BUS_STATION, WC_BUILD_TOOLBAR,
      WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
      _rv_station_picker_widgets,
      RoadStationPickerWndProc
    }

Definition at line 937 of file road_gui.cpp.

const Widget _rv_station_picker_widgets[]`[static]`

Initial value:

     {
    {   WWT_CLOSEBOX,   RESIZE_NONE,     7,     0,    10,     0,    13, STR_00C5,                         STR_018B_CLOSE_WINDOW},
    {    WWT_CAPTION,   RESIZE_NONE,     7,    11,   206,     0,    13, STR_NULL,                         STR_018C_WINDOW_TITLE_DRAG_THIS},
    {      WWT_PANEL,   RESIZE_NONE,     7,     0,   206,    14,   176, 0x0,                              STR_NULL},

    {      WWT_PANEL,   RESIZE_NONE,    14,    71,   136,    17,    66, 0x0,                              STR_NULL},
    {      WWT_PANEL,   RESIZE_NONE,    14,    71,   136,    69,   118, 0x0,                              STR_NULL},
    {      WWT_PANEL,   RESIZE_NONE,    14,     3,    68,    69,   118, 0x0,                              STR_NULL},
    {      WWT_PANEL,   RESIZE_NONE,    14,     3,    68,    17,    66, 0x0,                              STR_NULL},
    {      WWT_PANEL,   RESIZE_NONE,    14,   139,   204,    17,    66, 0x0,                              STR_NULL},
    {      WWT_PANEL,   RESIZE_NONE,    14,   139,   204,    69,   118, 0x0,                              STR_NULL},

    {    WWT_TEXTBTN,   RESIZE_NONE,    14,    10,    69,   133,   144, STR_02DB_OFF,                     STR_3065_DON_T_HIGHLIGHT_COVERAGE},
    {    WWT_TEXTBTN,   RESIZE_NONE,    14,    70,   129,   133,   144, STR_02DA_ON,                      STR_3064_HIGHLIGHT_COVERAGE_AREA},
    {      WWT_LABEL,   RESIZE_NONE,     7,     0,   139,   120,   133, STR_3066_COVERAGE_AREA_HIGHLIGHT, STR_NULL},
    {   WIDGETS_END},
    }

Widget definition of the build raod station window.

Definition at line 919 of file road_gui.cpp.