173 * XXX TODO : all airports should be held in arrays, with all relevant data. |
173 * XXX TODO : all airports should be held in arrays, with all relevant data. |
174 * This should be part of newgrf-airports, i suppose |
174 * This should be part of newgrf-airports, i suppose |
175 */ |
175 */ |
176 for (i = 0; i < 9; i++) w->SetWidgetDisabledState(i + 7, !HasBit(avail_airports, i)); |
176 for (i = 0; i < 9; i++) w->SetWidgetDisabledState(i + 7, !HasBit(avail_airports, i)); |
177 |
177 |
178 // select default the coverage area to 'Off' (16) |
178 /* select default the coverage area to 'Off' (16) */ |
179 airport = GetAirport(_selected_airport_type); |
179 airport = GetAirport(_selected_airport_type); |
180 SetTileSelectSize(airport->size_x, airport->size_y); |
180 SetTileSelectSize(airport->size_x, airport->size_y); |
181 |
181 |
182 int rad = _patches.modified_catchment ? airport->catchment : (uint)CA_UNMODIFIED; |
182 int rad = _patches.modified_catchment ? airport->catchment : (uint)CA_UNMODIFIED; |
183 |
183 |
184 if (_station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad); |
184 if (_station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad); |
185 |
185 |
186 DrawWindowWidgets(w); |
186 DrawWindowWidgets(w); |
187 // strings such as 'Size' and 'Coverage Area' |
187 /* strings such as 'Size' and 'Coverage Area' */ |
188 // 'Coverage Area' |
|
189 int text_end = DrawStationCoverageAreaText(2, 206, SCT_ALL, rad, false); |
188 int text_end = DrawStationCoverageAreaText(2, 206, SCT_ALL, rad, false); |
190 text_end = DrawStationCoverageAreaText(2, text_end + 4, SCT_ALL, rad, true) + 4; |
189 text_end = DrawStationCoverageAreaText(2, text_end + 4, SCT_ALL, rad, true) + 4; |
191 if (text_end != w->widget[6].bottom) { |
190 if (text_end != w->widget[6].bottom) { |
192 SetWindowDirty(w); |
191 SetWindowDirty(w); |
193 ResizeWindowForWidget(w, 6, 0, text_end - w->widget[6].bottom); |
192 ResizeWindowForWidget(w, 6, 0, text_end - w->widget[6].bottom); |