|
OpenTTD Source 20251116-master-g21329071df
|
Functions/types related to the road GUIs. More...
#include "road.h"#include "road_type.h"#include "tile_type.h"#include "direction_type.h"#include "dropdown_type.h"Go to the source code of this file.
Functions | |
| struct Window * | ShowBuildRoadToolbar (RoadType roadtype) |
| Open the build road toolbar window. | |
| struct Window * | ShowBuildRoadScenToolbar (RoadType roadtype) |
| Show the road building toolbar in the scenario editor. | |
| void | ConnectRoadToStructure (TileIndex tile, DiagDirection direction) |
| If required, connects a new structure to an existing road or tram by building the missing roadbit. | |
| DropDownList | GetRoadTypeDropDownList (RoadTramTypes rtts, bool for_replacement=false, bool all_option=false) |
| DropDownList | GetScenRoadTypeDropDownList (RoadTramTypes rtts) |
| void | InitializeRoadGUI () |
| I really don't know why rail_gui.cpp has this too, shouldn't be included in the other one? | |
Functions/types related to the road GUIs.
Definition in file road_gui.h.
| void ConnectRoadToStructure | ( | TileIndex | tile, |
| DiagDirection | direction | ||
| ) |
If required, connects a new structure to an existing road or tram by building the missing roadbit.
| tile | Tile containing the structure to connect. |
| direction | Direction to check. |
Definition at line 163 of file road_gui.cpp.
References DiagDirToRoadBits(), DRD_NONE, GetRoadBits(), IsNormalRoadTile(), ReverseDiagDir(), ROAD_NONE, and TileOffsByDiagDir().
Referenced by CcBuildBridge(), CcBuildRoadTunnel(), and CcRoadStop().
| DropDownList GetRoadTypeDropDownList | ( | RoadTramTypes | rtts, |
| bool | for_replacement = false, |
||
| bool | all_option = false |
||
| ) |
Definition at line 1766 of file road_gui.cpp.
| DropDownList GetScenRoadTypeDropDownList | ( | RoadTramTypes | rtts | ) |
Definition at line 1830 of file road_gui.cpp.
| void InitializeRoadGUI | ( | ) |
I really don't know why rail_gui.cpp has this too, shouldn't be included in the other one?
Definition at line 1760 of file road_gui.cpp.
References FindWindowById(), BuildRoadToolbarWindow::ModifyRoadType(), TRANSPORT_ROAD, and WC_BUILD_TOOLBAR.
Show the road building toolbar in the scenario editor.
nullptr if the toolbar was already open. Definition at line 1097 of file road_gui.cpp.
References CloseWindowById(), TRANSPORT_ROAD, and WC_SCEN_BUILD_TOOLBAR.
Referenced by BuildRoadToolbarWindow::RoadTramToolbarGlobalHotkeys(), ToolbarScenBuildRoad(), and ToolbarScenBuildTram().
Open the build road toolbar window.
If the terraform toolbar is linked to the toolbar, that window is also opened.
Definition at line 1006 of file road_gui.cpp.
References _local_company, CloseWindowByClass(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::IsValidID(), TRANSPORT_ROAD, ValParamRoadType(), and WC_BUILD_TOOLBAR.
Referenced by MenuClickBuildRoad(), MenuClickBuildTram(), MainToolbarWindow::OnHotkey(), and BuildRoadToolbarWindow::RoadTramToolbarGlobalHotkeys().