Changeset - r14336:367269b368e4
[Not reviewed]
master
0 1 0
rubidium - 14 years ago 2010-01-23 19:32:56
rubidium@openttd.org
(svn r18901) -Change: make the default button work again for the world generation window; previously it worked due to the bug fixed in r18899. Do not add it again for the town custom number because there is no default for that one.
1 file changed with 2 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/genworld_gui.cpp
Show inline comments
 
@@ -583,13 +583,13 @@ struct GenerateLandscapeWindow : public 
 
				_left_button_clicked = false;
 
				break;
 

	
 
			case GLAND_START_DATE_TEXT: // Year text
 
				this->widget_id = GLAND_START_DATE_TEXT;
 
				SetDParam(0, _settings_newgame.game_creation.starting_year);
 
				ShowQueryString(STR_JUST_INT, STR_MAPGEN_START_DATE_QUERY_CAPT, 8, 100, this, CS_NUMERAL, QSF_NONE);
 
				ShowQueryString(STR_JUST_INT, STR_MAPGEN_START_DATE_QUERY_CAPT, 8, 100, this, CS_NUMERAL, QSF_ENABLE_DEFAULT);
 
				break;
 

	
 
			case GLAND_SNOW_LEVEL_DOWN:
 
			case GLAND_SNOW_LEVEL_UP: // Snow line buttons
 
				/* Don't allow too fast scrolling */
 
				if ((this->flags4 & WF_TIMEOUT_MASK) <= WF_TIMEOUT_TRIGGER) {
 
@@ -601,13 +601,13 @@ struct GenerateLandscapeWindow : public 
 
				_left_button_clicked = false;
 
				break;
 

	
 
			case GLAND_SNOW_LEVEL_TEXT: // Snow line text
 
				this->widget_id = GLAND_SNOW_LEVEL_TEXT;
 
				SetDParam(0, _settings_newgame.game_creation.snow_line_height);
 
				ShowQueryString(STR_JUST_INT, STR_MAPGEN_SNOW_LINE_QUERY_CAPT, 3, 100, this, CS_NUMERAL, QSF_NONE);
 
				ShowQueryString(STR_JUST_INT, STR_MAPGEN_SNOW_LINE_QUERY_CAPT, 3, 100, this, CS_NUMERAL, QSF_ENABLE_DEFAULT);
 
				break;
 

	
 
			case GLAND_TREE_PULLDOWN: // Tree placer
 
				ShowDropDownMenu(this, _tree_placer, _settings_newgame.game_creation.tree_placer, GLAND_TREE_PULLDOWN, 0, 0);
 
				break;
 

	
 
@@ -740,13 +740,12 @@ struct GenerateLandscapeWindow : public 
 
			value = atoi(str);
 
		} else {
 
			/* An empty string means revert to the default */
 
			switch (this->widget_id) {
 
				case GLAND_START_DATE_TEXT: value = DEF_START_YEAR; break;
 
				case GLAND_SNOW_LEVEL_TEXT: value = DEF_SNOWLINE_HEIGHT; break;
 
				case GLAND_TOWN_PULLDOWN:   value = 1; break; // There's not really a default
 
				default: NOT_REACHED();
 
			}
 
		}
 

	
 
		switch (this->widget_id) {
 
			case GLAND_START_DATE_TEXT:
0 comments (0 inline, 0 general)