OpenTTD
|
GUI to create amazing water objects. More...
#include "stdafx.h"
#include "terraform_gui.h"
#include "window_gui.h"
#include "station_gui.h"
#include "command_func.h"
#include "water.h"
#include "window_func.h"
#include "vehicle_func.h"
#include "sound_func.h"
#include "viewport_func.h"
#include "gfx_func.h"
#include "company_func.h"
#include "slope_func.h"
#include "tilehighlight_func.h"
#include "company_base.h"
#include "hotkeys.h"
#include "gui.h"
#include "zoom_func.h"
#include "widgets/dock_widget.h"
#include "table/sprites.h"
#include "table/strings.h"
#include "safeguards.h"
Go to the source code of this file.
Data Structures | |
struct | BuildDocksToolbarWindow |
Toolbar window for constructing water infrastructure. More... | |
struct | BuildDocksStationWindow |
struct | BuildDocksDepotWindow |
Enumerations | |
enum | BuildDockStationWidgets { BDSW_BACKGROUND, BDSW_LT_OFF, BDSW_LT_ON, BDSW_INFO } |
Widget numbers of the build-dock GUI. More... |
Functions | |
static void | ShowBuildDockStationPicker (Window *parent) |
static void | ShowBuildDocksDepotPicker (Window *parent) |
void | CcBuildDocks (const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2) |
void | CcBuildCanal (const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2) |
static TileIndex | GetOtherAqueductEnd (TileIndex tile_from, TileIndex *tile_to=NULL) |
Gets the other end of the aqueduct, if possible. | |
static EventState | DockToolbarGlobalHotkeys (int hotkey) |
Handler for global hotkeys of the BuildDocksToolbarWindow. | |
Window * | ShowBuildDocksToolbar () |
Open the build water toolbar window. | |
Window * | ShowBuildDocksScenToolbar () |
Open the build water toolbar window for the scenario editor. | |
void | InitializeDockGui () |
Variables | |
static Axis | _ship_depot_direction |
const uint16 | _dockstoolbar_aqueduct_keys [] = {'B', '8', 0} |
static Hotkey | dockstoolbar_hotkeys [] |
static const NWidgetPart | _nested_build_docks_toolbar_widgets [] |
Nested widget parts of docks toolbar, game version. | |
static WindowDesc | _build_docks_toolbar_desc (WDP_ALIGN_TOOLBAR,"toolbar_water", 0, 0, WC_BUILD_TOOLBAR, WC_NONE, WDF_CONSTRUCTION, _nested_build_docks_toolbar_widgets, lengthof(_nested_build_docks_toolbar_widgets),&BuildDocksToolbarWindow::hotkeys) |
static const NWidgetPart | _nested_build_docks_scen_toolbar_widgets [] |
Nested widget parts of docks toolbar, scenario editor version. | |
static WindowDesc | _build_docks_scen_toolbar_desc (WDP_AUTO,"toolbar_water_scen", 0, 0, WC_SCEN_BUILD_TOOLBAR, WC_NONE, WDF_CONSTRUCTION, _nested_build_docks_scen_toolbar_widgets, lengthof(_nested_build_docks_scen_toolbar_widgets)) |
Window definition for the build docks in scenario editor window. | |
static const NWidgetPart | _nested_build_dock_station_widgets [] |
Nested widget parts of a build dock station window. | |
static WindowDesc | _build_dock_station_desc (WDP_AUTO, NULL, 0, 0, WC_BUILD_STATION, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, _nested_build_dock_station_widgets, lengthof(_nested_build_dock_station_widgets)) |
static const NWidgetPart | _nested_build_docks_depot_widgets [] |
static WindowDesc | _build_docks_depot_desc (WDP_AUTO, NULL, 0, 0, WC_BUILD_DEPOT, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, _nested_build_docks_depot_widgets, lengthof(_nested_build_docks_depot_widgets)) |
GUI to create amazing water objects.
Definition in file dock_gui.cpp.
Widget numbers of the build-dock GUI.
BDSW_BACKGROUND |
Background panel. |
BDSW_LT_OFF |
'Off' button of coverage high light. |
BDSW_LT_ON |
'On' button of coverage high light. |
BDSW_INFO |
'Coverage highlight' label. |
Definition at line 393 of file dock_gui.cpp.
|
static |
Handler for global hotkeys of the BuildDocksToolbarWindow.
hotkey | Hotkey |
Definition at line 286 of file dock_gui.cpp.
References ES_NOT_HANDLED, Window::OnHotkey(), and ShowBuildDocksToolbar().
Gets the other end of the aqueduct, if possible.
tile_from | The begin tile for the aqueduct. | |
[out] | tile_to | The tile till where to show a selection for the aqueduct. |
Definition at line 63 of file dock_gui.cpp.
References _settings_game, GameSettings::construction, DistanceFromEdgeDir(), GetInclinedSlopeDirection(), GetTileMaxZ(), GetTileSlope(), IsValidDiagDirection(), IsValidTile(), ConstructionSettings::max_bridge_length, min(), ReverseDiagDir(), TILE_ADD, TILE_ADDXY, TileOffsByDiagDir(), TileX(), and TileY().
Referenced by BuildDocksToolbarWindow::OnPlaceObject(), and BuildDocksToolbarWindow::OnPlacePresize().
Window* ShowBuildDocksScenToolbar | ( | ) |
Open the build water toolbar window for the scenario editor.
Definition at line 387 of file dock_gui.cpp.
References _build_docks_scen_toolbar_desc, and TRANSPORT_WATER.
Window* ShowBuildDocksToolbar | ( | ) |
Open the build water toolbar window.
If the terraform toolbar is linked to the toolbar, that window is also opened.
Definition at line 346 of file dock_gui.cpp.
References _local_company, DeleteWindowByClass(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), TRANSPORT_WATER, and WC_BUILD_TOOLBAR.
Referenced by DockToolbarGlobalHotkeys(), MenuClickBuildWater(), and MainToolbarWindow::OnHotkey().
|
static |
Window definition for the build docks in scenario editor window.
Referenced by ShowBuildDocksScenToolbar().
|
static |
Nested widget parts of a build dock station window.
Definition at line 461 of file dock_gui.cpp.
|
static |
Definition at line 550 of file dock_gui.cpp.
|
static |
Nested widget parts of docks toolbar, scenario editor version.
Positions of WID_DT_DEPOT, WID_DT_STATION, and WID_DT_BUOY widgets have changed.
Definition at line 358 of file dock_gui.cpp.
|
static |
Nested widget parts of docks toolbar, game version.
Position of WID_DT_RIVER widget has changed.
Definition at line 313 of file dock_gui.cpp.
|
static |
Definition at line 296 of file dock_gui.cpp.