File diff r14398:461a80e5f996 → r14399:3f819c0da60a
src/genworld_gui.cpp
Show inline comments
 
@@ -510,25 +510,25 @@ struct GenerateLandscapeWindow : public 
 
		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);
 
		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);
 

	
 
		this->DrawWidgets();
 

	
 
		this->DrawEditBox(GLAND_RANDOM_EDITBOX);
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget)
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		switch (widget) {
 
			case GLAND_TEMPERATE:
 
			case GLAND_ARCTIC:
 
			case GLAND_TROPICAL:
 
			case GLAND_TOYLAND:
 
				this->RaiseWidget(_settings_newgame.game_creation.landscape + GLAND_TEMPERATE);
 
				SetNewLandscapeType(widget - GLAND_TEMPERATE);
 
				break;
 

	
 
			case GLAND_MAPSIZE_X_PULLDOWN: // Mapsize X
 
				ShowDropDownList(this, BuildMapsizeDropDown(), _settings_newgame.game_creation.map_x, GLAND_MAPSIZE_X_PULLDOWN);
 
@@ -912,25 +912,25 @@ struct CreateScenarioWindow : public Win
 
			case CSCEN_FLAT_LAND_HEIGHT_TEXT:
 
				SetDParam(0, MAX_TILE_HEIGHT);
 
				break;
 

	
 
			default:
 
				return;
 
		}
 
		*size = GetStringBoundingBox(str);
 
		size->width += padding.width;
 
		size->height += padding.height;
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget)
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		switch (widget) {
 
			case CSCEN_TEMPERATE:
 
			case CSCEN_ARCTIC:
 
			case CSCEN_TROPICAL:
 
			case CSCEN_TOYLAND:
 
				this->RaiseWidget(_settings_newgame.game_creation.landscape + CSCEN_TEMPERATE);
 
				SetNewLandscapeType(widget - CSCEN_TEMPERATE);
 
				break;
 

	
 
			case CSCEN_MAPSIZE_X_PULLDOWN: // Mapsize X
 
				ShowDropDownList(this, BuildMapsizeDropDown(), _settings_newgame.game_creation.map_x, CSCEN_MAPSIZE_X_PULLDOWN);
 
@@ -1152,25 +1152,25 @@ static void AbortGeneratingWorldCallback
 
	} else if (IsGeneratingWorld() && !IsGeneratingWorldAborted()) {
 
		SetMouseCursor(SPR_CURSOR_ZZZ, PAL_NONE);
 
	}
 
}
 

	
 
struct GenerateProgressWindow : public Window {
 

	
 
	GenerateProgressWindow() : Window()
 
	{
 
		this->InitNested(&_generate_progress_desc);
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget)
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		switch (widget) {
 
			case GPWW_ABORT:
 
				if (_cursor.sprite == SPR_CURSOR_ZZZ) SetMouseCursor(SPR_CURSOR_MOUSE, PAL_NONE);
 
				ShowQuery(
 
					STR_GENERATION_ABORT_CAPTION,
 
					STR_GENERATION_ABORT_MESSAGE,
 
					this,
 
					AbortGeneratingWorldCallback
 
				);
 
				break;
 
		}