|
@@ -67,18 +67,18 @@ static OnButtonClick * const _build_air_
|
|
|
};
|
|
|
|
|
|
struct BuildAirToolbarWindow : Window {
|
|
|
BuildAirToolbarWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
|
|
|
{
|
|
|
this->FindWindowPlacementAndResize(desc);
|
|
|
if (_settings.gui.link_terraform_toolbar) ShowTerraformToolbar(this);
|
|
|
if (_settings_client.gui.link_terraform_toolbar) ShowTerraformToolbar(this);
|
|
|
}
|
|
|
|
|
|
~BuildAirToolbarWindow()
|
|
|
{
|
|
|
if (_settings.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0);
|
|
|
if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0);
|
|
|
}
|
|
|
|
|
|
virtual void OnPaint()
|
|
|
{
|
|
|
this->DrawWidgets();
|
|
|
}
|
|
@@ -175,13 +175,13 @@ public:
|
|
|
AirportPickerWindow(const WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent)
|
|
|
{
|
|
|
this->SetWidgetLoweredState(BAW_BTN_DONTHILIGHT, !_station_show_coverage);
|
|
|
this->SetWidgetLoweredState(BAW_BTN_DOHILIGHT, _station_show_coverage);
|
|
|
this->LowerWidget(_selected_airport_type + BAW_SMALL_AIRPORT);
|
|
|
|
|
|
if (_settings.economy.station_noise_level) {
|
|
|
if (_settings_game.economy.station_noise_level) {
|
|
|
ResizeWindowForWidget(this, BAW_BOTTOMPANEL, 0, 10);
|
|
|
}
|
|
|
|
|
|
this->FindWindowPlacementAndResize(desc);
|
|
|
}
|
|
|
|
|
@@ -208,20 +208,20 @@ public:
|
|
|
for (i = 0; i < BAW_AIRPORT_COUNT; i++) this->SetWidgetDisabledState(i + BAW_SMALL_AIRPORT, !HasBit(avail_airports, i));
|
|
|
|
|
|
/* select default the coverage area to 'Off' (16) */
|
|
|
airport = GetAirport(_selected_airport_type);
|
|
|
SetTileSelectSize(airport->size_x, airport->size_y);
|
|
|
|
|
|
int rad = _settings.station.modified_catchment ? airport->catchment : (uint)CA_UNMODIFIED;
|
|
|
int rad = _settings_game.station.modified_catchment ? airport->catchment : (uint)CA_UNMODIFIED;
|
|
|
|
|
|
if (_station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
|
|
|
|
|
|
this->DrawWidgets();
|
|
|
|
|
|
/* only show the station (airport) noise, if the noise option is activated */
|
|
|
if (_settings.economy.station_noise_level) {
|
|
|
if (_settings_game.economy.station_noise_level) {
|
|
|
/* show the noise of the selected airport */
|
|
|
SetDParam(0, airport->noise_level);
|
|
|
DrawString(2, 206, STR_STATION_NOISE, 0);
|
|
|
y_noise_offset = 10;
|
|
|
}
|
|
|
|