|
@@ -112,49 +112,49 @@ static void BuildAirToolbWndProc(Window
|
|
|
}
|
|
|
}
|
|
|
|
|
|
static const Widget _air_toolbar_widgets[] = {
|
|
|
{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW },
|
|
|
{ WWT_CAPTION, RESIZE_NONE, 7, 11, 73, 0, 13, STR_A000_AIRPORTS, STR_018C_WINDOW_TITLE_DRAG_THIS },
|
|
|
{ WWT_STICKYBOX, RESIZE_NONE, 7, 74, 85, 0, 13, 0x0, STR_STICKY_BUTTON },
|
|
|
{ WWT_PANEL, RESIZE_NONE, 7, 0, 41, 14, 35, 0x2E8, STR_A01E_BUILD_AIRPORT },
|
|
|
{ WWT_PANEL, RESIZE_NONE, 7, 42, 63, 14, 35, 0x2BF, STR_018D_DEMOLISH_BUILDINGS_ETC },
|
|
|
{ WWT_PANEL, RESIZE_NONE, 7, 64, 85, 14, 35, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP },
|
|
|
{ WIDGETS_END},
|
|
|
};
|
|
|
|
|
|
|
|
|
static const WindowDesc _air_toolbar_desc = {
|
|
|
640-86, 22, 86, 36,
|
|
|
WC_BUILD_TOOLBAR,0,
|
|
|
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON,
|
|
|
_air_toolbar_widgets,
|
|
|
BuildAirToolbWndProc
|
|
|
};
|
|
|
|
|
|
void ShowBuildAirToolbar(void)
|
|
|
{
|
|
|
if (_current_player == OWNER_SPECTATOR) return;
|
|
|
if (_current_player == PLAYER_SPECTATOR) return;
|
|
|
DeleteWindowById(WC_BUILD_TOOLBAR, 0);
|
|
|
AllocateWindowDescFront(&_air_toolbar_desc, 0);
|
|
|
if (_patches.link_terraform_toolbar) ShowTerraformToolbar();
|
|
|
}
|
|
|
|
|
|
static void BuildAirportPickerWndProc(Window *w, WindowEvent *e)
|
|
|
{
|
|
|
switch (e->event) {
|
|
|
case WE_CREATE:
|
|
|
SetWindowWidgetLoweredState(w, 16, !_station_show_coverage);
|
|
|
SetWindowWidgetLoweredState(w, 17, _station_show_coverage);
|
|
|
LowerWindowWidget(w, _selected_airport_type + 7);
|
|
|
break;
|
|
|
|
|
|
case WE_PAINT: {
|
|
|
int i; // airport enabling loop
|
|
|
int rad = 4; // default catchment radious
|
|
|
uint32 avail_airports;
|
|
|
const AirportFTAClass *airport;
|
|
|
|
|
|
if (WP(w,def_d).close) return;
|
|
|
|
|
|
avail_airports = GetValidAirports();
|
|
|
|