src/airport_gui.cpp
changeset 6367 2f569d554980
parent 6144 5a0ffbf27ced
child 6368 1cd52ab482bb
equal deleted inserted replaced
6366:921566e065b1 6367:2f569d554980
   148 		LowerWindowWidget(w, _selected_airport_type + 7);
   148 		LowerWindowWidget(w, _selected_airport_type + 7);
   149 		break;
   149 		break;
   150 
   150 
   151 	case WE_PAINT: {
   151 	case WE_PAINT: {
   152 		int i; // airport enabling loop
   152 		int i; // airport enabling loop
   153 		int rad = 4; // default catchment radious
       
   154 		uint32 avail_airports;
   153 		uint32 avail_airports;
   155 		const AirportFTAClass *airport;
   154 		const AirportFTAClass *airport;
   156 
   155 
   157 		if (WP(w,def_d).close) return;
   156 		if (WP(w,def_d).close) return;
   158 
   157 
   173 
   172 
   174 		// select default the coverage area to 'Off' (16)
   173 		// select default the coverage area to 'Off' (16)
   175 		airport = GetAirport(_selected_airport_type);
   174 		airport = GetAirport(_selected_airport_type);
   176 		SetTileSelectSize(airport->size_x, airport->size_y);
   175 		SetTileSelectSize(airport->size_x, airport->size_y);
   177 
   176 
   178 		if (_patches.modified_catchment) {
   177 		uint rad = _patches.modified_catchment ? airport->catchment : 4;
   179 			switch (_selected_airport_type) {
       
   180 				case AT_OILRIG:        rad = CA_AIR_OILPAD;   break;
       
   181 				case AT_HELIPORT:      rad = CA_AIR_HELIPORT; break;
       
   182 				case AT_SMALL:         rad = CA_AIR_SMALL;    break;
       
   183 				case AT_LARGE:         rad = CA_AIR_LARGE;    break;
       
   184 				case AT_METROPOLITAN:  rad = CA_AIR_METRO;    break;
       
   185 				case AT_INTERNATIONAL: rad = CA_AIR_INTER;    break;
       
   186 				case AT_COMMUTER:      rad = CA_AIR_COMMUTER; break;
       
   187 				case AT_HELIDEPOT:     rad = CA_AIR_HELIDEPOT; break;
       
   188 				case AT_INTERCON:      rad = CA_AIR_INTERCON; break;
       
   189 				case AT_HELISTATION:   rad = CA_AIR_HELISTATION; break;
       
   190 			}
       
   191 		}
       
   192 
   178 
   193 		if (_station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
   179 		if (_station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
   194 
   180 
   195 		DrawWindowWidgets(w);
   181 		DrawWindowWidgets(w);
   196 		// strings such as 'Size' and 'Coverage Area'
   182 		// strings such as 'Size' and 'Coverage Area'