src/airport_gui.cpp
branchNewGRF_ports
changeset 10184 fcf5fb2548eb
parent 6882 f508b3bab2c5
child 10192 195d7f6dcf71
equal deleted inserted replaced
10179:eec5a7dcbf61 10184:fcf5fb2548eb
     2 
     2 
     3 /** @file airport_gui.cpp */
     3 /** @file airport_gui.cpp */
     4 
     4 
     5 #include "stdafx.h"
     5 #include "stdafx.h"
     6 #include "openttd.h"
     6 #include "openttd.h"
       
     7 #include "gui.h"
     7 #include "window_gui.h"
     8 #include "window_gui.h"
     8 #include "gui.h"
     9 #include "player_func.h"
     9 #include "station_gui.h"
       
    10 #include "terraform_gui.h"
    10 #include "terraform_gui.h"
    11 #include "command_func.h"
    11 #include "command_func.h"
    12 #include "station.h"
    12 #include "station_gui.h"
       
    13 #include "station_func.h"
    13 #include "airport.h"
    14 #include "airport.h"
    14 #include "depot.h"
    15 #include "depot.h"
    15 #include "newgrf_callbacks.h"
    16 #include "newgrf_callbacks.h"
    16 #include "sound_func.h"
    17 #include "sound_func.h"
       
    18 #include "settings_type.h"
       
    19 
       
    20 #include "strings_func.h"
       
    21 #include "core/alloc_func.hpp"
    17 #include "window_func.h"
    22 #include "window_func.h"
    18 #include "settings_type.h"
       
    19 #include "viewport_func.h"
    23 #include "viewport_func.h"
    20 #include "gfx_func.h"
    24 #include "gfx_func.h"
    21 #include "player_func.h"
       
    22 #include "widgets/dropdown_type.h"
       
    23 #include "widgets/dropdown_func.h"
    25 #include "widgets/dropdown_func.h"
    24 #include "strings_func.h"
    26 #include "order_func.h"
    25 
    27 
    26 //TODO: remove station.h once converted to newgrf airports. stations just used as temporary loader
    28 //TODO: remove station.h once converted to newgrf airports. stations just used as temporary loader
    27 #include "station.h"
    29 //#include "station.h"
    28 
    30 
    29 #include "table/sprites.h"
    31 #include "table/sprites.h"
    30 #include "table/strings.h"
    32 #include "table/strings.h"
    31 
    33 
    32 static struct {
    34 static struct {
   253 			_thd.FSMportLayout = &fsmportspec->layouts[_airport.layout_set];  // irregular airport support
   255 			_thd.FSMportLayout = &fsmportspec->layouts[_airport.layout_set];  // irregular airport support
   254 			_thd.FSMportMask = NULL;
   256 			_thd.FSMportMask = NULL;
   255 			if (fsmportspec->layout_mask != NULL) _thd.FSMportMask = &fsmportspec->layout_mask[_airport.layout_set];  // irregular airport support
   257 			if (fsmportspec->layout_mask != NULL) _thd.FSMportMask = &fsmportspec->layout_mask[_airport.layout_set];  // irregular airport support
   256 			int rad = _patches.modified_catchment ? fsmportspec->portFSM->catchment : 4;
   258 			int rad = _patches.modified_catchment ? fsmportspec->portFSM->catchment : 4;
   257 			if (_station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
   259 			if (_station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
   258 			int text_end = DrawStationCoverageAreaText(2, 206, SCT_ALL, rad) + 4;
   260 			int text_end = DrawStationCoverageAreaText(2, 206, SCT_ALL, rad, false);
       
   261 			text_end = DrawStationCoverageAreaText(2, text_end + 4, SCT_ALL, rad, true) + 4;
   259 			if (text_end > w->widget[BAPW_BACKGROUND].bottom) {
   262 			if (text_end > w->widget[BAPW_BACKGROUND].bottom) {
   260 				SetWindowDirty(w);
   263 				SetWindowDirty(w);
   261 				ResizeWindowForWidget(w, BAPW_BACKGROUND, 0, text_end - w->widget[BAPW_BACKGROUND].bottom);
   264 				ResizeWindowForWidget(w, BAPW_BACKGROUND, 0, text_end - w->widget[BAPW_BACKGROUND].bottom);
   262 				SetWindowDirty(w);
   265 				SetWindowDirty(w);
   263 			}
   266 			}