File diff r25078:95767d321ffb → r25079:09d645764ffe
src/genworld_gui.cpp
Show inline comments
 
@@ -1059,13 +1059,13 @@ struct CreateScenarioWindow : public Win
 
			case WID_CS_FLAT_LAND_HEIGHT_UP: // Height level buttons
 
				/* Don't allow too fast scrolling */
 
				if (!(this->flags & WF_TIMEOUT) || this->timeout_timer <= 1) {
 
					this->HandleButtonClick(widget);
 
					this->SetDirty();
 

	
 
					_settings_newgame.game_creation.se_flat_world_height = Clamp(_settings_newgame.game_creation.se_flat_world_height + widget - WID_CS_FLAT_LAND_HEIGHT_TEXT, 0, _settings_game.construction.max_heightlevel);
 
					_settings_newgame.game_creation.se_flat_world_height = Clamp(_settings_newgame.game_creation.se_flat_world_height + widget - WID_CS_FLAT_LAND_HEIGHT_TEXT, 0, _settings_game.construction.map_height_limit);
 
				}
 
				_left_button_clicked = false;
 
				break;
 

	
 
			case WID_CS_FLAT_LAND_HEIGHT_TEXT: // Height level text
 
				this->widget_id = WID_CS_FLAT_LAND_HEIGHT_TEXT;
 
@@ -1105,13 +1105,13 @@ struct CreateScenarioWindow : public Win
 
					this->SetWidgetDirty(WID_CS_START_DATE_TEXT);
 
					_settings_newgame.game_creation.starting_year = Clamp(value, MIN_YEAR, MAX_YEAR);
 
					break;
 

	
 
				case WID_CS_FLAT_LAND_HEIGHT_TEXT:
 
					this->SetWidgetDirty(WID_CS_FLAT_LAND_HEIGHT_TEXT);
 
					_settings_newgame.game_creation.se_flat_world_height = Clamp(value, 0, _settings_game.construction.max_heightlevel);
 
					_settings_newgame.game_creation.se_flat_world_height = Clamp(value, 0, _settings_game.construction.map_height_limit);
 
					break;
 
			}
 

	
 
			this->SetDirty();
 
		}
 
	}