| OpenTTD
    | 
The GUI for airports. More...
#include "stdafx.h"#include "window_gui.h"#include "station_gui.h"#include "terraform_gui.h"#include "sound_func.h"#include "window_func.h"#include "strings_func.h"#include "viewport_func.h"#include "company_func.h"#include "tilehighlight_func.h"#include "company_base.h"#include "station_type.h"#include "newgrf_airport.h"#include "newgrf_callbacks.h"#include "widgets/dropdown_type.h"#include "core/geometry_func.hpp"#include "hotkeys.h"#include "vehicle_func.h"#include "gui.h"#include "widgets/airport_widget.h"#include "safeguards.h"Go to the source code of this file.
| Data Structures | |
| struct | BuildAirToolbarWindow | 
| Airport build toolbar window handler.  More... | |
| class | BuildAirportWindow | 
| Functions | |
| static void | ShowBuildAirportPicker (Window *parent) | 
| SpriteID | GetCustomAirportSprite (const AirportSpec *as, byte layout) | 
| void | CcBuildAirport (const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2) | 
| static void | PlaceAirport (TileIndex tile) | 
| Place an airport. | |
| static EventState | AirportToolbarGlobalHotkeys (int hotkey) | 
| Handler for global hotkeys of the BuildAirToolbarWindow. | |
| Window * | ShowBuildAirToolbar () | 
| Open the build airport toolbar window. | |
| void | InitializeAirportGui () | 
| Variables | |
| static AirportClassID | _selected_airport_class | 
| the currently visible airport class | |
| static int | _selected_airport_index | 
| the index of the selected airport in the current class or -1 | |
| static byte | _selected_airport_layout | 
| selected airport layout number. | |
| static Hotkey | airtoolbar_hotkeys [] | 
| static const NWidgetPart | _nested_air_toolbar_widgets [] | 
| static WindowDesc | _air_toolbar_desc (WDP_ALIGN_TOOLBAR,"toolbar_air", 0, 0, WC_BUILD_TOOLBAR, WC_NONE, WDF_CONSTRUCTION, _nested_air_toolbar_widgets, lengthof(_nested_air_toolbar_widgets),&BuildAirToolbarWindow::hotkeys) | 
| static const NWidgetPart | _nested_build_airport_widgets [] | 
| static WindowDesc | _build_airport_desc (WDP_AUTO,"build_station_air", 0, 0, WC_BUILD_STATION, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, _nested_build_airport_widgets, lengthof(_nested_build_airport_widgets)) | 
The GUI for airports.
Definition in file airport_gui.cpp.
| 
 | static | 
Handler for global hotkeys of the BuildAirToolbarWindow.
| hotkey | Hotkey | 
Definition at line 160 of file airport_gui.cpp.
References CanBuildVehicleInfrastructure(), ES_NOT_HANDLED, Window::OnHotkey(), ShowBuildAirToolbar(), and VEH_AIRCRAFT.
| 
 | static | 
Place an airport.
| tile | Position to put the new airport. | 
Definition at line 57 of file airport_gui.cpp.
References _ctrl_pressed, _selected_airport_class, _selected_airport_index, _selected_airport_layout, CMD_BUILD_AIRPORT, CMD_MSG, NewGRFClass< Tspec, Tid, Tmax >::Get(), SB(), ShowSelectStationIfNeeded(), TileHighlightData::size, and TILE_SIZE.
Referenced by BuildAirToolbarWindow::OnPlaceObject().
| Window* ShowBuildAirToolbar | ( | ) | 
Open the build airport toolbar window.
If the terraform toolbar is linked to the toolbar, that window is also opened.
Definition at line 203 of file airport_gui.cpp.
References _local_company, DeleteWindowByClass(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), TRANSPORT_AIR, and WC_BUILD_TOOLBAR.
Referenced by AirportToolbarGlobalHotkeys(), MenuClickBuildAir(), and MainToolbarWindow::OnHotkey().
| 
 | static | 
Definition at line 175 of file airport_gui.cpp.
| 
 | static | 
Definition at line 168 of file airport_gui.cpp.
 1.8.1.2
 1.8.1.2