|
@@ -416,26 +416,32 @@ struct GenerateLandscapeWindow : public
|
|
|
case GLAND_HEIGHTMAP_SIZE_TEXT:
|
|
|
if (_settings_newgame.game_creation.heightmap_rotation == HM_CLOCKWISE) {
|
|
|
SetDParam(0, this->y);
|
|
|
SetDParam(1, this->x);
|
|
|
} else {
|
|
|
SetDParam(0, this->x);
|
|
|
SetDParam(1, this->y);
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
virtual void OnInvalidateData(int data = 0)
|
|
|
/**
|
|
|
* Some data on this window has become invalid.
|
|
|
* @param data Information about the changed data.
|
|
|
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
|
|
|
*/
|
|
|
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
|
|
|
{
|
|
|
if (!gui_scope) return;
|
|
|
/* Update the climate buttons */
|
|
|
this->SetWidgetLoweredState(GLAND_TEMPERATE, _settings_newgame.game_creation.landscape == LT_TEMPERATE);
|
|
|
this->SetWidgetLoweredState(GLAND_ARCTIC, _settings_newgame.game_creation.landscape == LT_ARCTIC);
|
|
|
this->SetWidgetLoweredState(GLAND_TROPICAL, _settings_newgame.game_creation.landscape == LT_TROPIC);
|
|
|
this->SetWidgetLoweredState(GLAND_TOYLAND, _settings_newgame.game_creation.landscape == LT_TOYLAND);
|
|
|
|
|
|
/* You can't select smoothness / non-water borders if not terragenesis */
|
|
|
if (mode == GLWM_GENERATE) {
|
|
|
this->SetWidgetDisabledState(GLAND_SMOOTHNESS_PULLDOWN, _settings_newgame.game_creation.land_generator == 0);
|
|
|
this->SetWidgetDisabledState(GLAND_VARIETY_PULLDOWN, _settings_newgame.game_creation.land_generator == 0);
|
|
|
this->SetWidgetDisabledState(GLAND_BORDERS_RANDOM, _settings_newgame.game_creation.land_generator == 0 || !_settings_newgame.construction.freeform_edges);
|
|
|
this->SetWidgetsDisabledState(_settings_newgame.game_creation.land_generator == 0 || !_settings_newgame.construction.freeform_edges || _settings_newgame.game_creation.water_borders == BORDERS_RANDOM,
|