From abb601f682775de2f0670482f0b4b773300c9949 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 21 Dec 2009 16:13:30 +0000 Subject: (svn r18585) -Codechange: replace some magic numbers by constants --- src/genworld_gui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/genworld_gui.cpp') diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index 1a2f12a4d..adb59522f 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -499,7 +499,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow { this->SetWidgetDisabledState(GLAND_START_DATE_DOWN, _settings_newgame.game_creation.starting_year <= MIN_YEAR); this->SetWidgetDisabledState(GLAND_START_DATE_UP, _settings_newgame.game_creation.starting_year >= MAX_YEAR); - this->SetWidgetDisabledState(GLAND_SNOW_LEVEL_DOWN, _settings_newgame.game_creation.snow_line_height <= 2 || _settings_newgame.game_creation.landscape != LT_ARCTIC); + this->SetWidgetDisabledState(GLAND_SNOW_LEVEL_DOWN, _settings_newgame.game_creation.snow_line_height <= MIN_SNOWLINE_HEIGHT || _settings_newgame.game_creation.landscape != LT_ARCTIC); this->SetWidgetDisabledState(GLAND_SNOW_LEVEL_UP, _settings_newgame.game_creation.snow_line_height >= MAX_SNOWLINE_HEIGHT || _settings_newgame.game_creation.landscape != LT_ARCTIC); this->SetWidgetLoweredState(GLAND_TEMPERATE, _settings_newgame.game_creation.landscape == LT_TEMPERATE); @@ -589,7 +589,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow { this->HandleButtonClick(widget); this->SetDirty(); - _settings_newgame.game_creation.snow_line_height = Clamp(_settings_newgame.game_creation.snow_line_height + widget - GLAND_SNOW_LEVEL_TEXT, 2, MAX_SNOWLINE_HEIGHT); + _settings_newgame.game_creation.snow_line_height = Clamp(_settings_newgame.game_creation.snow_line_height + widget - GLAND_SNOW_LEVEL_TEXT, MIN_SNOWLINE_HEIGHT, MAX_SNOWLINE_HEIGHT); } _left_button_clicked = false; break; @@ -743,7 +743,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow { case GLAND_SNOW_LEVEL_TEXT: this->SetWidgetDirty(GLAND_SNOW_LEVEL_TEXT); - _settings_newgame.game_creation.snow_line_height = Clamp(value, 2, MAX_SNOWLINE_HEIGHT); + _settings_newgame.game_creation.snow_line_height = Clamp(value, MIN_SNOWLINE_HEIGHT, MAX_SNOWLINE_HEIGHT); break; case GLAND_TOWN_PULLDOWN: -- cgit v1.2.3-54-g00ecf