airport_gui.cpp File Reference

The GUI for airports. More...

#include "stdafx.h"
#include "window_gui.h"
#include "station_gui.h"
#include "terraform_gui.h"
#include "airport.h"
#include "sound_func.h"
#include "window_func.h"
#include "strings_func.h"
#include "viewport_func.h"
#include "gfx_func.h"
#include "company_func.h"
#include "tilehighlight_func.h"
#include "company_base.h"
#include "station_type.h"
#include "table/sprites.h"
#include "table/strings.h"

Go to the source code of this file.

Data Structures

struct  BuildAirToolbarWindow
class  AirportPickerWindow

Typedefs

typedef void OnButtonClick (Window *w)

Enumerations

enum  { ATW_AIRPORT, ATW_DEMOLISH }
 Widget number of the airport build window. More...
enum  AirportPickerWidgets {
  BAW_SMALL_AIRPORT, BAW_CITY_AIRPORT, BAW_HELIPORT, BAW_METRO_AIRPORT,
  BAW_INTERNATIONAL_AIRPORT, BAW_COMMUTER_AIRPORT, BAW_HELIDEPOT, BAW_INTERCONTINENTAL_AIRPORT,
  BAW_HELISTATION, BAW_BOTTOMPANEL, BAW_BTN_DONTHILIGHT, BAW_BTN_DOHILIGHT,
  BAW_LAST_AIRPORT = BAW_HELISTATION, BAW_AIRPORT_COUNT = BAW_LAST_AIRPORT - BAW_SMALL_AIRPORT + 1
}
 Airport widgets in the airport picker window. More...

Functions

static void ShowBuildAirportPicker (Window *parent)
void CcBuildAirport (const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
static void PlaceAirport (TileIndex tile)
static void BuildAirClick_Airport (Window *w)
static void BuildAirClick_Demolish (Window *w)
void ShowBuildAirToolbar ()
void InitializeAirportGui ()

Variables

static byte _selected_airport_type
static OnButtonClick *const _build_air_button_proc []
static const NWidgetPart _nested_air_toolbar_widgets []
static const WindowDesc _air_toolbar_desc (WDP_ALIGN_TOOLBAR, 0, 0, WC_BUILD_TOOLBAR, WC_NONE, WDF_CONSTRUCTION, _nested_air_toolbar_widgets, lengthof(_nested_air_toolbar_widgets))
static const NWidgetPart _nested_build_airport_widgets []
static const WindowDesc _build_airport_desc (WDP_AUTO, 0, 0, WC_BUILD_STATION, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, _nested_build_airport_widgets, lengthof(_nested_build_airport_widgets))


Detailed Description

The GUI for airports.

Definition in file airport_gui.cpp.


Enumeration Type Documentation

anonymous enum

Widget number of the airport build window.

Definition at line 53 of file airport_gui.cpp.

Airport widgets in the airport picker window.

Definition at line 166 of file airport_gui.cpp.


Variable Documentation

OnButtonClick* const _build_air_button_proc[] [static]

Initial value:

 {
  BuildAirClick_Airport,
  BuildAirClick_Demolish,
}

Definition at line 71 of file airport_gui.cpp.

const NWidgetPart _nested_air_toolbar_widgets[] [static]

Initial value:

 {
  NWidget(NWID_HORIZONTAL),
    NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
    NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_TOOLBAR_AIRCRAFT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
    NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
  EndContainer(),
  NWidget(NWID_HORIZONTAL),
    NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ATW_AIRPORT), SetFill(0, 1), SetMinimalSize(42, 22), SetDataTip(SPR_IMG_AIRPORT, STR_TOOLBAR_AIRCRAFT_BUILD_AIRPORT_TOOLTIP),
    NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetMinimalSize(4, 22), SetFill(1, 1), EndContainer(),
    NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, ATW_DEMOLISH), SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_DYNAMITE, STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC),
  EndContainer(),
}

Definition at line 137 of file airport_gui.cpp.


Generated on Thu Feb 4 17:20:31 2010 for OpenTTD by  doxygen 1.5.6