OpenTTD Source
20241125-master-g5b02f51e17
|
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 |
Enumerations | |
enum | BuildDockStationWidgets { BDSW_BACKGROUND , BDSW_LT_OFF , BDSW_LT_ON , BDSW_INFO , BDSW_ACCEPTANCE } |
Widget numbers of the build-dock GUI. More... | |
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. More... | |
Window * | ShowBuildDocksToolbar () |
Open the build water toolbar window. More... | |
Window * | ShowBuildDocksScenToolbar () |
Open the build water toolbar window for the scenario editor. More... | |
void | InitializeDockGui () |
Variables | |
static Axis | _ship_depot_direction |
static constexpr NWidgetPart | _nested_build_docks_toolbar_widgets [] |
Nested widget parts of docks toolbar, game version. More... | |
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, &BuildDocksToolbarWindow::hotkeys) |
static constexpr NWidgetPart | _nested_build_docks_scen_toolbar_widgets [] |
Nested widget parts of docks toolbar, scenario editor version. More... | |
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) |
Window definition for the build docks in scenario editor window. | |
static constexpr NWidgetPart | _nested_build_dock_station_widgets [] |
Nested widget parts of a build dock station window. More... | |
static WindowDesc | _build_dock_station_desc (WDP_AUTO, nullptr, 0, 0, WC_BUILD_STATION, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, _nested_build_dock_station_widgets) |
static constexpr NWidgetPart | _nested_build_docks_depot_widgets [] |
static WindowDesc | _build_docks_depot_desc (WDP_AUTO, nullptr, 0, 0, WC_BUILD_DEPOT, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, _nested_build_docks_depot_widgets) |
GUI to create amazing water objects.
Definition in file dock_gui.cpp.
Widget numbers of the build-dock GUI.
Definition at line 409 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().
Window* ShowBuildDocksScenToolbar | ( | ) |
Open the build water toolbar window for the scenario editor.
Definition at line 403 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 362 of file dock_gui.cpp.
References _local_company, CloseWindowByClass(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), and WC_BUILD_TOOLBAR.
Referenced by MenuClickBuildWater().
|
staticconstexpr |
Nested widget parts of a build dock station window.
Definition at line 482 of file dock_gui.cpp.
|
staticconstexpr |
Definition at line 583 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 374 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 329 of file dock_gui.cpp.