|
OpenTTD Source 20251117-master-g7398d2e290
|
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 "tunnelbridge_cmd.h"#include "dock_cmd.h"#include "station_cmd.h"#include "water_cmd.h"#include "waypoint_cmd.h"#include "timer/timer.h"#include "timer/timer_game_calendar.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 |
Functions | |
| static void | ShowBuildDockStationPicker (Window *parent) |
| static void | ShowBuildDocksDepotPicker (Window *parent) |
| void | CcBuildDocks (Commands, const CommandCost &result, TileIndex tile) |
| void | CcPlaySound_CONSTRUCTION_WATER (Commands, const CommandCost &result, TileIndex tile) |
| static TileIndex | GetOtherAqueductEnd (TileIndex tile_from, TileIndex *tile_to=nullptr) |
| Gets the other end of the aqueduct, if possible. | |
| 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 |
| static constexpr std::initializer_list< NWidgetPart > | _nested_build_docks_toolbar_widgets |
| Nested widget parts of docks toolbar, game version. | |
| static WindowDesc | _build_docks_toolbar_desc (WDP_MANUAL, "toolbar_water", 0, 0, WC_BUILD_TOOLBAR, WC_NONE, WindowDefaultFlag::Construction, _nested_build_docks_toolbar_widgets, &BuildDocksToolbarWindow::hotkeys) |
| static constexpr std::initializer_list< 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, WindowDefaultFlag::Construction, _nested_build_docks_scen_toolbar_widgets) |
| Window definition for the build docks in scenario editor window. | |
| static constexpr std::initializer_list< NWidgetPart > | _nested_build_dock_station_widgets |
| Nested widget parts of a build dock station window. | |
| static WindowDesc | _build_dock_station_desc (WDP_AUTO, {}, 0, 0, WC_BUILD_STATION, WC_BUILD_TOOLBAR, WindowDefaultFlag::Construction, _nested_build_dock_station_widgets) |
| static constexpr std::initializer_list< NWidgetPart > | _nested_build_docks_depot_widgets |
| static WindowDesc | _build_docks_depot_desc (WDP_AUTO, {}, 0, 0, WC_BUILD_DEPOT, WC_BUILD_TOOLBAR, WindowDefaultFlag::Construction, _nested_build_docks_depot_widgets) |
GUI to create amazing water objects.
Definition in file dock_gui.cpp.
| void CcBuildDocks | ( | Commands | , |
| const CommandCost & | result, | ||
| TileIndex | tile | ||
| ) |
Definition at line 48 of file dock_gui.cpp.
| void CcPlaySound_CONSTRUCTION_WATER | ( | Commands | , |
| const CommandCost & | result, | ||
| TileIndex | tile | ||
| ) |
Definition at line 56 of file dock_gui.cpp.
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 68 of file dock_gui.cpp.
References _settings_game, GameSettings::construction, DistanceFromEdgeDir(), GetInclinedSlopeDirection(), GetTileMaxZ(), GetTileSlopeZ(), IsValidDiagDirection(), IsValidTile(), ConstructionSettings::max_bridge_length, ReverseDiagDir(), TileAdd(), TileAddXY(), TileOffsByDiagDir(), TileX(), and TileY().
Referenced by BuildDocksToolbarWindow::OnPlaceObject(), and BuildDocksToolbarWindow::OnPlacePresize().
| void InitializeDockGui | ( | ) |
Definition at line 614 of file dock_gui.cpp.
|
static |
Definition at line 608 of file dock_gui.cpp.
| Window * ShowBuildDocksScenToolbar | ( | ) |
Open the build water toolbar window for the scenario editor.
Definition at line 415 of file dock_gui.cpp.
References _build_docks_scen_toolbar_desc, and TRANSPORT_WATER.
|
static |
Definition at line 512 of file dock_gui.cpp.
| 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 374 of file dock_gui.cpp.
References _local_company, CloseWindowByClass(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::IsValidID(), TRANSPORT_WATER, and WC_BUILD_TOOLBAR.
Referenced by BuildDocksToolbarWindow::DockToolbarGlobalHotkeys(), MenuClickBuildWater(), and MainToolbarWindow::OnHotkey().
|
staticconstexpr |
Nested widget parts of a build dock station window.
Definition at line 486 of file dock_gui.cpp.
|
staticconstexpr |
Definition at line 587 of file dock_gui.cpp.
|
staticconstexpr |
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 386 of file dock_gui.cpp.
|
staticconstexpr |
Nested widget parts of docks toolbar, game version.
Position of WID_DT_RIVER widget has changed.
Definition at line 341 of file dock_gui.cpp.
|
static |
Definition at line 46 of file dock_gui.cpp.