rail_gui.cpp File Reference

File for dealing with rail construction user interface. More...

#include "stdafx.h"
#include "openttd.h"
#include "tile_cmd.h"
#include "landscape.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 "station.h"
#include "waypoint.h"
#include "debug.h"
#include "variables.h"
#include "newgrf_callbacks.h"
#include "newgrf_station.h"
#include "train.h"
#include "strings_func.h"
#include "functions.h"
#include "window_func.h"
#include "date_func.h"
#include "sound_func.h"
#include "player_func.h"
#include "settings_type.h"
#include "widgets/dropdown_type.h"
#include "widgets/dropdown_func.h"
#include "bridge_map.h"
#include "rail_map.h"
#include "road_map.h"
#include "station_map.h"
#include "tunnel_map.h"
#include "tunnelbridge_map.h"
#include "table/sprites.h"
#include "table/strings.h"

Go to the source code of this file.

Typedefs

typedef void OnButtonClick (Window *w)

Enumerations

enum  RailToolbarWidgets {
  RTW_CLOSEBOX = 0, RTW_CAPTION, RTW_STICKY, RTW_SPACER,
  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
}
 Enum referring to the widgets of the build rail toolbar.
enum  BuildRailStationWidgets {
  BRSW_CLOSEBOX = 0, BRSW_CAPTION, BRSW_BACKGROUND, BRSW_PLATFORM_DIR_X,
  BRSW_PLATFORM_DIR_Y, BRSW_PLATFORM_NUM_BEGIN = BRSW_PLATFORM_DIR_Y, BRSW_PLATFORM_NUM_1, BRSW_PLATFORM_NUM_2,
  BRSW_PLATFORM_NUM_3, BRSW_PLATFORM_NUM_4, BRSW_PLATFORM_NUM_5, BRSW_PLATFORM_NUM_6,
  BRSW_PLATFORM_NUM_7, BRSW_PLATFORM_LEN_BEGIN = BRSW_PLATFORM_NUM_7, BRSW_PLATFORM_LEN_1, BRSW_PLATFORM_LEN_2,
  BRSW_PLATFORM_LEN_3, BRSW_PLATFORM_LEN_4, BRSW_PLATFORM_LEN_5, BRSW_PLATFORM_LEN_6,
  BRSW_PLATFORM_LEN_7, BRSW_PLATFORM_DRAG_N_DROP, BRSW_HIGHLIGHT_OFF, BRSW_HIGHLIGHT_ON,
  BRSW_NEWST_DROPDOWN, BRSW_NEWST_LIST, BRSW_NEWST_SCROLL
}
 Enum referring to the widgets of the rail stations window.
enum  BuildSignalWidgets {
  BSW_CLOSEBOX = 0, BSW_CAPTION, BSW_SEMAPHORE_NORM, BSW_SEMAPHORE_ENTRY,
  BSW_SEMAPHORE_EXIT, BSW_SEMAPHORE_COMBO, BSW_ELECTRIC_NORM, BSW_ELECTRIC_ENTRY,
  BSW_ELECTRIC_EXIT, BSW_ELECTRIC_COMBO, BSW_CONVERT, BSW_DRAG_SIGNALS_DENSITY,
  BSW_DRAG_SIGNALS_DENSITY_DECREASE, BSW_DRAG_SIGNALS_DENSITY_INCREASE
}
 Enum referring to the widgets of the signal window.
enum  BuildRailDepotWidgets {
  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 rail depot window.
enum  BuildRailWaypointWidgets {
  BRWW_CLOSEBOX = 0, BRWW_CAPTION, BRWW_BACKGROUND, BRWW_WAYPOINT_1,
  BRWW_WAYPOINT_2, BRWW_WAYPOINT_3, BRWW_WAYPOINT_4, BRWW_WAYPOINT_5,
  BRWW_SCROLL
}
 Enum referring to the widgets of the build NewGRF rail waypoint window.

Functions

static void HandleStationPlacement (TileIndex start, TileIndex end)
static void ShowBuildTrainDepotPicker ()
static void ShowBuildWaypointPicker ()
static void ShowStationBuilder ()
static void ShowSignalBuilder ()
 Open the signal selection window.
void CcPlaySound1E (bool success, TileIndex tile, uint32 p1, uint32 p2)
static void GenericPlaceRail (TileIndex tile, int cmd)
static void PlaceRail_N (TileIndex tile)
static void PlaceRail_NE (TileIndex tile)
static void PlaceRail_E (TileIndex tile)
static void PlaceRail_NW (TileIndex tile)
static void PlaceRail_AutoRail (TileIndex tile)
static void PlaceExtraDepotRail (TileIndex tile, uint16 extra)
void CcRailDepot (bool success, TileIndex tile, uint32 p1, uint32 p2)
static void PlaceRail_Depot (TileIndex tile)
static void PlaceRail_Waypoint (TileIndex tile)
void CcStation (bool success, TileIndex tile, uint32 p1, uint32 p2)
static void PlaceRail_Station (TileIndex tile)
static void GenericPlaceSignals (TileIndex tile)
 Build a new signal or edit/remove a present signal, use CmdBuildSingleSignal() or CmdRemoveSingleSignal() in rail_cmd.cpp.
static void PlaceRail_Bridge (TileIndex tile)
void CcBuildRailTunnel (bool success, TileIndex tile, uint32 p1, uint32 p2)
static void PlaceRail_Tunnel (TileIndex tile)
void PlaceProc_BuyLand (TileIndex tile)
static void PlaceRail_ConvertRail (TileIndex tile)
static void PlaceRail_AutoSignals (TileIndex tile)
static void ToggleRailButton_Remove (Window *w)
 Toogles state of the Remove button of Build rail toolbar.
static bool RailToolbar_CtrlChanged (Window *w)
 Updates the Remove button because of Ctrl state change.
static void BuildRailClick_N (Window *w)
static void BuildRailClick_NE (Window *w)
static void BuildRailClick_E (Window *w)
static void BuildRailClick_NW (Window *w)
static void BuildRailClick_AutoRail (Window *w)
static void BuildRailClick_Demolish (Window *w)
static void BuildRailClick_Depot (Window *w)
static void BuildRailClick_Waypoint (Window *w)
static void BuildRailClick_Station (Window *w)
static void BuildRailClick_AutoSignals (Window *w)
 The "build signal"-button proc from BuildRailToolbWndProc() (start ShowSignalBuilder() and/or HandleAutoSignalPlacement()).
static void BuildRailClick_Bridge (Window *w)
static void BuildRailClick_Tunnel (Window *w)
static void BuildRailClick_Remove (Window *w)
static void BuildRailClick_Convert (Window *w)
static void DoRailroadTrack (int mode)
static void HandleAutodirPlacement ()
static void HandleAutoSignalPlacement ()
 Build new signals or remove signals or (if only one tile marked) edit a signal.
static void UpdateRemoveWidgetStatus (Window *w, int clicked_widget)
static void BuildRailToolbWndProc (Window *w, WindowEvent *e)
 Railway toolbar window event definition.
static void SetupRailToolbar (RailType railtype, Window *w)
 Configures the rail toolbar for railtype given.
void ShowBuildRailToolbar (RailType railtype, int button)
static void CheckSelectedSize (Window *w, const StationSpec *statspec)
static DropDownList * BuildStationClassDropDown ()
static void StationBuildWndProc (Window *w, WindowEvent *e)
static void DrawSignalSprite (const Window *w, byte widget_index, SpriteID image, int8 xrel, uint8 xsize)
 Draw dynamic a signal-sprite in a button in the signal GUI Draw the sprite +1px to the right and down if the button is lowered and change the sprite to sprite + 1 (red to green light).
static void SignalBuildWndProc (Window *w, WindowEvent *e)
 Signal selection window event definition.
static void BuildTrainDepotWndProc (Window *w, WindowEvent *e)
static void BuildWaypointWndProc (Window *w, WindowEvent *e)
void InitializeRailGui ()
void ReinitGuiAfterToggleElrail (bool disable)
void SetDefaultRailGui ()

Variables

static RailType _cur_railtype
static bool _remove_button_clicked
static DiagDirection _build_depot_direction
static byte _waypoint_count = 1
static byte _cur_waypoint_type
static bool _convert_signal_button
static SignalVariant _cur_signal_variant
static SignalType _cur_signal_type
struct {
   byte   orientation
   byte   numtracks
   byte   platlength
   bool   dragdrop
   bool   newstations
   StationClassIDByte   station_class
   byte   station_type
   byte   station_count
_railstation
static const uint16 _place_depot_extra [12]
static OnButtonClick *const _build_railroad_button_proc []
static const uint16 _rail_keycodes []
static const Widget _build_rail_widgets []
 Widget definition for the rail toolbar.
static const WindowDesc _build_rail_desc
static const Widget _station_builder_widgets []
 Widget definition of the standard build rail station window.
static const Widget _newstation_builder_widgets []
 Widget definition of the build NewGRF rail station window.
static const WindowDesc _station_builder_desc
static const WindowDesc _newstation_builder_desc
static const Widget _signal_builder_widgets []
 Widget definition of the build signal window.
static const WindowDesc _signal_builder_desc
 Signal selection window description.
static const Widget _build_depot_widgets []
 Widget definition of the build rail depot window.
static const WindowDesc _build_depot_desc
static const Widget _build_waypoint_widgets []
 Widget definition for the build NewGRF rail waypoint window.
static const WindowDesc _build_waypoint_desc


Detailed Description

File for dealing with rail construction user interface.

Definition in file rail_gui.cpp.


Function Documentation

static void BuildRailToolbWndProc ( Window *  w,
WindowEvent *  e 
) [static]

static void DrawSignalSprite ( const Window *  w,
byte  widget_index,
SpriteID  image,
int8  xrel,
uint8  xsize 
) [static]

Draw dynamic a signal-sprite in a button in the signal GUI Draw the sprite +1px to the right and down if the button is lowered and change the sprite to sprite + 1 (red to green light).

Parameters:
w Window on which the widget is located
widget_index index of this widget in the window
image the sprite to draw
xrel the relativ x value of the sprite in the grf
xsize the width of the sprite

Definition at line 1249 of file rail_gui.cpp.

Referenced by SignalBuildWndProc().

static void GenericPlaceSignals ( TileIndex  tile  )  [static]

Build a new signal or edit/remove a present signal, use CmdBuildSingleSignal() or CmdRemoveSingleSignal() in rail_cmd.cpp.

Parameters:
tile The tile where the signal will build or edit

Definition at line 190 of file rail_gui.cpp.

References _ctrl_pressed, CMD_BUILD_SIGNALS, CMD_MSG, CMD_REMOVE_SIGNALS, DoCommandP(), FindFirstTrack(), SB(), SIG_ELECTRIC, SIG_SEMAPHORE, SIGTYPE_NORMAL, TRACK_BIT_HORZ, TRACK_BIT_LEFT, TRACK_BIT_LOWER, TRACK_BIT_RIGHT, TRACK_BIT_UPPER, TRACK_BIT_VERT, and TrackStatusToTrackBits().

Referenced by HandleAutoSignalPlacement().

static void HandleAutoSignalPlacement (  )  [static]

Build new signals or remove signals or (if only one tile marked) edit a signal.

If one tile marked abort and use GenericPlaceSignals() else use CmdBuildSingleSignal() or CmdRemoveSingleSignal() in rail_cmd.cpp to build many signals

Definition at line 447 of file rail_gui.cpp.

References _ctrl_pressed, CMD_BUILD_SIGNAL_TRACK, CMD_MSG, CMD_NO_WATER, CMD_REMOVE_SIGNAL_TRACK, DoCommandP(), GB(), GenericPlaceSignals(), and SB().

Referenced by BuildRailToolbWndProc().

static bool RailToolbar_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 297 of file rail_gui.cpp.

References ToggleRailButton_Remove().

Referenced by BuildRailToolbWndProc().

static void SetupRailToolbar ( RailType  railtype,
Window *  w 
) [static]

Configures the rail toolbar for railtype given.

Parameters:
railtype the railtype to display
w the window to modify

Definition at line 708 of file rail_gui.cpp.

References RailtypeInfo::auto_rail, RailtypeInfo::build_depot, RailtypeInfo::build_ew_rail, RailtypeInfo::build_ns_rail, RailtypeInfo::build_tunnel, RailtypeInfo::build_x_rail, RailtypeInfo::build_y_rail, RailtypeInfo::convert_rail, GetRailTypeInfo(), RailtypeInfo::gui_sprites, RAILTYPE_END, RailtypeInfo::strings, and RailtypeInfo::toolbar_caption.

static void ShowSignalBuilder (  )  [static]

Open the signal selection window.

Precondition:
reset all signal GUI relevant variables

Definition at line 1380 of file rail_gui.cpp.

References AllocateWindowDesc(), SIG_ELECTRIC, SIG_SEMAPHORE, and SIGTYPE_NORMAL.

Referenced by BuildRailClick_AutoSignals().

static void SignalBuildWndProc ( Window *  w,
WindowEvent *  e 
) [static]

Signal selection window event definition.

Parameters:
w window pointer
e event been triggered

Definition at line 1262 of file rail_gui.cpp.

References DrawSignalSprite(), SetWindowDirty(), SIG_ELECTRIC, SIG_SEMAPHORE, and SIGTYPE_COMBO.

static void ToggleRailButton_Remove ( Window *  w  )  [static]

Toogles state of the Remove button of Build rail toolbar.

Parameters:
w window the button belongs to

Definition at line 285 of file rail_gui.cpp.

Referenced by RailToolbar_CtrlChanged().


Variable Documentation

const WindowDesc _build_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_depot_widgets,
  BuildTrainDepotWndProc
}

Definition at line 1452 of file rail_gui.cpp.

const Widget _build_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_1014_TRAIN_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_1020_SELECT_RAILROAD_DEPOT_ORIENTATIO}, 
{      WWT_PANEL,   RESIZE_NONE,    14,    71,   136,    69,   118, 0x0,                              STR_1020_SELECT_RAILROAD_DEPOT_ORIENTATIO}, 
{      WWT_PANEL,   RESIZE_NONE,    14,     3,    68,    69,   118, 0x0,                              STR_1020_SELECT_RAILROAD_DEPOT_ORIENTATIO}, 
{      WWT_PANEL,   RESIZE_NONE,    14,     3,    68,    17,    66, 0x0,                              STR_1020_SELECT_RAILROAD_DEPOT_ORIENTATIO}, 
{   WIDGETS_END},
}
Widget definition of the build rail depot window.

Definition at line 1441 of file rail_gui.cpp.

const WindowDesc _build_rail_desc [static]

Initial value:

Definition at line 695 of file rail_gui.cpp.

const Widget _build_rail_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,   337,     0,    13, STR_100A_RAILROAD_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS},         
{  WWT_STICKYBOX,   RESIZE_NONE,     7,   338,   349,     0,    13, 0x0,                            STR_STICKY_BUTTON},                       

{      WWT_PANEL,   RESIZE_NONE,     7,   110,   113,    14,    35, 0x0,                            STR_NULL},                                

{     WWT_IMGBTN,   RESIZE_NONE,     7,    0,     21,    14,    35, SPR_IMG_RAIL_NS,                STR_1018_BUILD_RAILROAD_TRACK},           
{     WWT_IMGBTN,   RESIZE_NONE,     7,    22,    43,    14,    35, SPR_IMG_RAIL_NE,                STR_1018_BUILD_RAILROAD_TRACK},           
{     WWT_IMGBTN,   RESIZE_NONE,     7,    44,    65,    14,    35, SPR_IMG_RAIL_EW,                STR_1018_BUILD_RAILROAD_TRACK},           
{     WWT_IMGBTN,   RESIZE_NONE,     7,    66,    87,    14,    35, SPR_IMG_RAIL_NW,                STR_1018_BUILD_RAILROAD_TRACK},           
{     WWT_IMGBTN,   RESIZE_NONE,     7,    88,   109,    14,    35, SPR_IMG_AUTORAIL,               STR_BUILD_AUTORAIL_TIP},                  

{     WWT_IMGBTN,   RESIZE_NONE,     7,   114,   135,    14,    35, SPR_IMG_DYNAMITE,               STR_018D_DEMOLISH_BUILDINGS_ETC},         
{     WWT_IMGBTN,   RESIZE_NONE,     7,   136,   157,    14,    35, SPR_IMG_DEPOT_RAIL,             STR_1019_BUILD_TRAIN_DEPOT_FOR_BUILDING}, 
{     WWT_IMGBTN,   RESIZE_NONE,     7,   158,   179,    14,    35, SPR_IMG_WAYPOINT,               STR_CONVERT_RAIL_TO_WAYPOINT_TIP},        

{     WWT_IMGBTN,   RESIZE_NONE,     7,   180,   221,    14,    35, SPR_IMG_RAIL_STATION,           STR_101A_BUILD_RAILROAD_STATION},         
{     WWT_IMGBTN,   RESIZE_NONE,     7,   222,   243,    14,    35, SPR_IMG_RAIL_SIGNALS,           STR_101B_BUILD_RAILROAD_SIGNALS},         
{     WWT_IMGBTN,   RESIZE_NONE,     7,   244,   285,    14,    35, SPR_IMG_BRIDGE,                 STR_101C_BUILD_RAILROAD_BRIDGE},          
{     WWT_IMGBTN,   RESIZE_NONE,     7,   286,   305,    14,    35, SPR_IMG_TUNNEL_RAIL,            STR_101D_BUILD_RAILROAD_TUNNEL},          
{     WWT_IMGBTN,   RESIZE_NONE,     7,   306,   327,    14,    35, SPR_IMG_REMOVE,                 STR_101E_TOGGLE_BUILD_REMOVE_FOR},        
{     WWT_IMGBTN,   RESIZE_NONE,     7,   328,   349,    14,    35, SPR_IMG_CONVERT_RAIL,           STR_CONVERT_RAIL_TIP},                    

{   WIDGETS_END},
}
Widget definition for the rail toolbar.

Definition at line 668 of file rail_gui.cpp.

OnButtonClick* const _build_railroad_button_proc[] [static]

Initial value:

 {
  BuildRailClick_N,
  BuildRailClick_NE,
  BuildRailClick_E,
  BuildRailClick_NW,
  BuildRailClick_AutoRail,
  BuildRailClick_Demolish,
  BuildRailClick_Depot,
  BuildRailClick_Waypoint,
  BuildRailClick_Station,
  BuildRailClick_AutoSignals,
  BuildRailClick_Bridge,
  BuildRailClick_Tunnel,
  BuildRailClick_Remove,
  BuildRailClick_Convert
}

Definition at line 479 of file rail_gui.cpp.

const WindowDesc _build_waypoint_desc [static]

Initial value:

 {
  WDP_AUTO, WDP_AUTO, 344, 92, 344, 92,
  WC_BUILD_DEPOT, WC_BUILD_TOOLBAR,
  WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
  _build_waypoint_widgets,
  BuildWaypointWndProc
}

Definition at line 1555 of file rail_gui.cpp.

const Widget _build_waypoint_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,   343,     0,    13, STR_WAYPOINT, STR_018C_WINDOW_TITLE_DRAG_THIS},  
{      WWT_PANEL,   RESIZE_NONE,     7,     0,   343,    14,    91, 0x0,          STR_NULL},                         

{      WWT_PANEL,   RESIZE_NONE,     7,     3,    68,    17,    76, 0x0,          STR_WAYPOINT_GRAPHICS_TIP},        
{      WWT_PANEL,   RESIZE_NONE,     7,    71,   136,    17,    76, 0x0,          STR_WAYPOINT_GRAPHICS_TIP},        
{      WWT_PANEL,   RESIZE_NONE,     7,   139,   204,    17,    76, 0x0,          STR_WAYPOINT_GRAPHICS_TIP},        
{      WWT_PANEL,   RESIZE_NONE,     7,   207,   272,    17,    76, 0x0,          STR_WAYPOINT_GRAPHICS_TIP},        
{      WWT_PANEL,   RESIZE_NONE,     7,   275,   340,    17,    76, 0x0,          STR_WAYPOINT_GRAPHICS_TIP},        

{ WWT_HSCROLLBAR,   RESIZE_NONE,    7,     1,   343,     80,    91, 0x0,          STR_0190_SCROLL_BAR_SCROLLS_LIST}, 
{    WIDGETS_END},
}
Widget definition for the build NewGRF rail waypoint window.

Definition at line 1540 of file rail_gui.cpp.

const WindowDesc _newstation_builder_desc [static]

Initial value:

 {
  WDP_AUTO, WDP_AUTO, 148, 290, 148, 290,
  WC_BUILD_STATION, WC_BUILD_TOOLBAR,
  WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
  _newstation_builder_widgets,
  StationBuildWndProc
}

Definition at line 1196 of file rail_gui.cpp.

const uint16 _place_depot_extra[12] [static]

Initial value:

 {
  0x0604, 0x2102, 0x1202, 0x0505,
  0x2400, 0x2801, 0x1800, 0x1401,
  0x2203, 0x0904, 0x0A05, 0x1103,
}

Definition at line 120 of file rail_gui.cpp.

const uint16 _rail_keycodes[] [static]

Initial value:

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

Definition at line 496 of file rail_gui.cpp.

const WindowDesc _signal_builder_desc [static]

Initial value:

Signal selection window description.

Definition at line 1368 of file rail_gui.cpp.

const Widget _signal_builder_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, 109,   0,  13, STR_SIGNAL_SELECTION,   STR_018C_WINDOW_TITLE_DRAG_THIS},       

{      WWT_PANEL,   RESIZE_NONE,  7,   0,  21,  14,  40, STR_NULL,               STR_BUILD_SIGNAL_SEMAPHORE_NORM_TIP},   
{      WWT_PANEL,   RESIZE_NONE,  7,  22,  43,  14,  40, STR_NULL,               STR_BUILD_SIGNAL_SEMAPHORE_ENTRY_TIP},  
{      WWT_PANEL,   RESIZE_NONE,  7,  44,  65,  14,  40, STR_NULL,               STR_BUILD_SIGNAL_SEMAPHORE_EXIT_TIP},   
{      WWT_PANEL,   RESIZE_NONE,  7,  66,  87,  14,  40, STR_NULL,               STR_BUILD_SIGNAL_SEMAPHORE_COMBO_TIP},  

{      WWT_PANEL,   RESIZE_NONE,  7,   0,  21,  41,  67, STR_NULL,               STR_BUILD_SIGNAL_ELECTRIC_NORM_TIP},    
{      WWT_PANEL,   RESIZE_NONE,  7,  22,  43,  41,  67, STR_NULL,               STR_BUILD_SIGNAL_ELECTRIC_ENTRY_TIP},   
{      WWT_PANEL,   RESIZE_NONE,  7,  44,  65,  41,  67, STR_NULL,               STR_BUILD_SIGNAL_ELECTRIC_EXIT_TIP},    
{      WWT_PANEL,   RESIZE_NONE,  7,  66,  87,  41,  67, STR_NULL,               STR_BUILD_SIGNAL_ELECTRIC_COMBO_TIP},   

{     WWT_IMGBTN,   RESIZE_NONE,  7,  88, 109,  14,  40, SPR_IMG_SIGNAL_CONVERT, STR_SIGNAL_CONVERT_TIP},                
{      WWT_PANEL,   RESIZE_NONE,  7,  88, 109,  41,  67, STR_NULL,               STR_DRAG_SIGNALS_DENSITY_TIP},          
{ WWT_PUSHIMGBTN,   RESIZE_NONE, 14,  90,  98,  54,  65, SPR_ARROW_LEFT,         STR_DRAG_SIGNALS_DENSITY_DECREASE_TIP}, 
{ WWT_PUSHIMGBTN,   RESIZE_NONE, 14,  99, 107,  54,  65, SPR_ARROW_RIGHT,        STR_DRAG_SIGNALS_DENSITY_INCREASE_TIP}, 

{   WIDGETS_END},
}
Widget definition of the build signal window.

Definition at line 1345 of file rail_gui.cpp.

const WindowDesc _station_builder_desc [static]

Initial value:

 {
  WDP_AUTO, WDP_AUTO, 148, 200, 148, 200,
  WC_BUILD_STATION, WC_BUILD_TOOLBAR,
  WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
  _station_builder_widgets,
  StationBuildWndProc
}

Definition at line 1188 of file rail_gui.cpp.

const Widget _station_builder_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,   147,     0,    13, STR_3000_RAIL_STATION_SELECTION, STR_018C_WINDOW_TITLE_DRAG_THIS},     
{      WWT_PANEL,   RESIZE_NONE,     7,     0,   147,    14,   199, 0x0,                             STR_NULL},                            
{      WWT_PANEL,   RESIZE_NONE,    14,     7,    72,    26,    73, 0x0,                             STR_304E_SELECT_RAILROAD_STATION},    
{      WWT_PANEL,   RESIZE_NONE,    14,    75,   140,    26,    73, 0x0,                             STR_304E_SELECT_RAILROAD_STATION},    

{    WWT_TEXTBTN,   RESIZE_NONE,    14,    22,    36,    87,    98, STR_00CB_1,                      STR_304F_SELECT_NUMBER_OF_PLATFORMS}, 
{    WWT_TEXTBTN,   RESIZE_NONE,    14,    37,    51,    87,    98, STR_00CC_2,                      STR_304F_SELECT_NUMBER_OF_PLATFORMS}, 
{    WWT_TEXTBTN,   RESIZE_NONE,    14,    52,    66,    87,    98, STR_00CD_3,                      STR_304F_SELECT_NUMBER_OF_PLATFORMS}, 
{    WWT_TEXTBTN,   RESIZE_NONE,    14,    67,    81,    87,    98, STR_00CE_4,                      STR_304F_SELECT_NUMBER_OF_PLATFORMS}, 
{    WWT_TEXTBTN,   RESIZE_NONE,    14,    82,    96,    87,    98, STR_00CF_5,                      STR_304F_SELECT_NUMBER_OF_PLATFORMS}, 
{    WWT_TEXTBTN,   RESIZE_NONE,    14,    97,   111,    87,    98, STR_6,                           STR_304F_SELECT_NUMBER_OF_PLATFORMS}, 
{    WWT_TEXTBTN,   RESIZE_NONE,    14,   112,   126,    87,    98, STR_7,                           STR_304F_SELECT_NUMBER_OF_PLATFORMS}, 

{    WWT_TEXTBTN,   RESIZE_NONE,    14,    22,    36,   112,   123, STR_00CB_1,                      STR_3050_SELECT_LENGTH_OF_RAILROAD},  
{    WWT_TEXTBTN,   RESIZE_NONE,    14,    37,    51,   112,   123, STR_00CC_2,                      STR_3050_SELECT_LENGTH_OF_RAILROAD},  
{    WWT_TEXTBTN,   RESIZE_NONE,    14,    52,    66,   112,   123, STR_00CD_3,                      STR_3050_SELECT_LENGTH_OF_RAILROAD},  
{    WWT_TEXTBTN,   RESIZE_NONE,    14,    67,    81,   112,   123, STR_00CE_4,                      STR_3050_SELECT_LENGTH_OF_RAILROAD},  
{    WWT_TEXTBTN,   RESIZE_NONE,    14,    82,    96,   112,   123, STR_00CF_5,                      STR_3050_SELECT_LENGTH_OF_RAILROAD},  
{    WWT_TEXTBTN,   RESIZE_NONE,    14,    97,   111,   112,   123, STR_6,                           STR_3050_SELECT_LENGTH_OF_RAILROAD},  
{    WWT_TEXTBTN,   RESIZE_NONE,    14,   112,   126,   112,   123, STR_7,                           STR_3050_SELECT_LENGTH_OF_RAILROAD},  

{    WWT_TEXTBTN,   RESIZE_NONE,    14,    37,   111,   126,   137, STR_DRAG_DROP,                   STR_STATION_DRAG_DROP},               
{    WWT_TEXTBTN,   RESIZE_NONE,    14,    14,    73,   152,   163, STR_02DB_OFF,                    STR_3065_DON_T_HIGHLIGHT_COVERAGE},   
{    WWT_TEXTBTN,   RESIZE_NONE,    14,    74,   133,   152,   163, STR_02DA_ON,                     STR_3064_HIGHLIGHT_COVERAGE_AREA},    
{   WIDGETS_END},
}
Widget definition of the standard build rail station window.

Definition at line 1124 of file rail_gui.cpp.


Generated on Mon Sep 22 20:34:24 2008 for openttd by  doxygen 1.5.6