diff options
-rw-r--r-- | src/genworld_gui.cpp | 48 | ||||
-rw-r--r-- | src/lang/english.txt | 3 | ||||
-rw-r--r-- | src/widgets/genworld_widget.h | 4 |
3 files changed, 1 insertions, 54 deletions
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index 20c12d8b4..c05cf09bc 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -110,7 +110,6 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = { NWidget(NWID_VERTICAL), SetPIP(0, 4, 0), NWidget(NWID_HORIZONTAL), SetPIP(0, 3, 0), NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0), - NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_MAX_HEIGHTLEVEL, STR_NULL), SetFill(1, 1), NWidget(NWID_SELECTION, INVALID_COLOUR, WID_GL_CLIMATE_SEL_LABEL), NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_SNOW_COVERAGE, STR_NULL), SetFill(1, 1), NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_DESERT_COVERAGE, STR_NULL), SetFill(1, 1), @@ -121,12 +120,6 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = { NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_GAME_OPTIONS_TOWN_NAMES_FRAME, STR_NULL), SetFill(1, 1), EndContainer(), NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0), - /* Max. heightlevel. */ - NWidget(NWID_HORIZONTAL), - NWidget(WWT_IMGBTN, COLOUR_ORANGE, WID_GL_MAX_HEIGHTLEVEL_DOWN), SetDataTip(SPR_ARROW_DOWN, STR_MAPGEN_MAX_HEIGHTLEVEL_DOWN), SetFill(0, 1), - NWidget(WWT_TEXTBTN, COLOUR_ORANGE, WID_GL_MAX_HEIGHTLEVEL_TEXT), SetDataTip(STR_BLACK_INT, STR_NULL), SetFill(1, 0), - NWidget(WWT_IMGBTN, COLOUR_ORANGE, WID_GL_MAX_HEIGHTLEVEL_UP), SetDataTip(SPR_ARROW_UP, STR_MAPGEN_MAX_HEIGHTLEVEL_UP), SetFill(0, 1), - EndContainer(), NWidget(NWID_SELECTION, INVALID_COLOUR, WID_GL_CLIMATE_SEL_SELECTOR), /* Snow coverage. */ NWidget(NWID_HORIZONTAL), @@ -238,7 +231,6 @@ static const NWidgetPart _nested_heightmap_load_widgets[] = { NWidget(NWID_VERTICAL), SetPIP(0, 4, 0), NWidget(NWID_HORIZONTAL), SetPIP(0, 3, 0), NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0), - NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_MAX_HEIGHTLEVEL, STR_NULL), SetFill(1, 1), NWidget(NWID_SELECTION, INVALID_COLOUR, WID_GL_CLIMATE_SEL_LABEL), NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_SNOW_COVERAGE, STR_NULL), SetFill(1, 1), NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_DESERT_COVERAGE, STR_NULL), SetFill(1, 1), @@ -247,11 +239,6 @@ static const NWidgetPart _nested_heightmap_load_widgets[] = { NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_GAME_OPTIONS_TOWN_NAMES_FRAME, STR_NULL), SetFill(1, 1), EndContainer(), NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0), - NWidget(NWID_HORIZONTAL), - NWidget(WWT_IMGBTN, COLOUR_ORANGE, WID_GL_MAX_HEIGHTLEVEL_DOWN), SetDataTip(SPR_ARROW_DOWN, STR_MAPGEN_MAX_HEIGHTLEVEL_DOWN), SetFill(0, 1), - NWidget(WWT_TEXTBTN, COLOUR_ORANGE, WID_GL_MAX_HEIGHTLEVEL_TEXT), SetDataTip(STR_BLACK_INT, STR_NULL), SetFill(1, 0), - NWidget(WWT_IMGBTN, COLOUR_ORANGE, WID_GL_MAX_HEIGHTLEVEL_UP), SetDataTip(SPR_ARROW_UP, STR_MAPGEN_MAX_HEIGHTLEVEL_UP), SetFill(0, 1), - EndContainer(), NWidget(NWID_SELECTION, INVALID_COLOUR, WID_GL_CLIMATE_SEL_SELECTOR), NWidget(NWID_HORIZONTAL), NWidget(WWT_IMGBTN, COLOUR_ORANGE, WID_GL_SNOW_COVERAGE_DOWN), SetDataTip(SPR_ARROW_DOWN, STR_MAPGEN_SNOW_COVERAGE_DOWN), SetFill(0, 1), @@ -386,7 +373,6 @@ struct GenerateLandscapeWindow : public Window { case WID_GL_START_DATE_TEXT: SetDParam(0, ConvertYMDToDate(_settings_newgame.game_creation.starting_year, 0, 1)); break; case WID_GL_MAPSIZE_X_PULLDOWN: SetDParam(0, 1LL << _settings_newgame.game_creation.map_x); break; case WID_GL_MAPSIZE_Y_PULLDOWN: SetDParam(0, 1LL << _settings_newgame.game_creation.map_y); break; - case WID_GL_MAX_HEIGHTLEVEL_TEXT: SetDParam(0, _settings_newgame.construction.max_heightlevel); break; case WID_GL_SNOW_COVERAGE_TEXT: SetDParam(0, _settings_newgame.game_creation.snow_coverage); break; case WID_GL_DESERT_COVERAGE_TEXT: SetDParam(0, _settings_newgame.game_creation.desert_coverage); break; @@ -495,8 +481,6 @@ struct GenerateLandscapeWindow : public Window { this->GetWidget<NWidgetStacked>(WID_GL_CLIMATE_SEL_SELECTOR)->SetDisplayedPlane(climate_plane); /* Update availability of decreasing / increasing start date and snow level */ - this->SetWidgetDisabledState(WID_GL_MAX_HEIGHTLEVEL_DOWN, _settings_newgame.construction.max_heightlevel <= MIN_MAX_HEIGHTLEVEL); - this->SetWidgetDisabledState(WID_GL_MAX_HEIGHTLEVEL_UP, _settings_newgame.construction.max_heightlevel >= MAX_MAX_HEIGHTLEVEL); this->SetWidgetDisabledState(WID_GL_START_DATE_DOWN, _settings_newgame.game_creation.starting_year <= MIN_YEAR); this->SetWidgetDisabledState(WID_GL_START_DATE_UP, _settings_newgame.game_creation.starting_year >= MAX_YEAR); this->SetWidgetDisabledState(WID_GL_SNOW_COVERAGE_DOWN, _settings_newgame.game_creation.snow_coverage <= 0 || _settings_newgame.game_creation.landscape != LT_ARCTIC); @@ -516,11 +500,6 @@ struct GenerateLandscapeWindow : public Window { { const StringID *strs = nullptr; switch (widget) { - case WID_GL_MAX_HEIGHTLEVEL_TEXT: - SetDParam(0, MAX_TILE_HEIGHT); - *size = GetStringBoundingBox(STR_JUST_INT); - break; - case WID_GL_START_DATE_TEXT: SetDParam(0, ConvertYMDToDate(MAX_YEAR, 0, 1)); *size = maxdim(*size, GetStringBoundingBox(STR_BLACK_DATE_LONG)); @@ -661,25 +640,6 @@ struct GenerateLandscapeWindow : public Window { break; } - case WID_GL_MAX_HEIGHTLEVEL_DOWN: - case WID_GL_MAX_HEIGHTLEVEL_UP: // Height level buttons - /* Don't allow too fast scrolling */ - if (!(this->flags & WF_TIMEOUT) || this->timeout_timer <= 1) { - this->HandleButtonClick(widget); - - _settings_newgame.construction.max_heightlevel = Clamp(_settings_newgame.construction.max_heightlevel + widget - WID_GL_MAX_HEIGHTLEVEL_TEXT, MIN_MAX_HEIGHTLEVEL, MAX_MAX_HEIGHTLEVEL); - this->InvalidateData(); - } - _left_button_clicked = false; - break; - - case WID_GL_MAX_HEIGHTLEVEL_TEXT: // Height level text - this->widget_id = WID_GL_MAX_HEIGHTLEVEL_TEXT; - SetDParam(0, _settings_newgame.construction.max_heightlevel); - ShowQueryString(STR_JUST_INT, STR_MAPGEN_MAX_HEIGHTLEVEL_QUERY_CAPT, 4, this, CS_NUMERAL, QSF_ENABLE_DEFAULT); - break; - - case WID_GL_START_DATE_DOWN: case WID_GL_START_DATE_UP: // Year buttons /* Don't allow too fast scrolling */ @@ -799,7 +759,7 @@ struct GenerateLandscapeWindow : public Window { void OnTimeout() override { - static const int raise_widgets[] = {WID_GL_MAX_HEIGHTLEVEL_DOWN, WID_GL_MAX_HEIGHTLEVEL_UP, WID_GL_START_DATE_DOWN, WID_GL_START_DATE_UP, WID_GL_SNOW_COVERAGE_UP, WID_GL_SNOW_COVERAGE_DOWN, WID_GL_DESERT_COVERAGE_UP, WID_GL_DESERT_COVERAGE_DOWN, WIDGET_LIST_END}; + static const int raise_widgets[] = {WID_GL_START_DATE_DOWN, WID_GL_START_DATE_UP, WID_GL_SNOW_COVERAGE_UP, WID_GL_SNOW_COVERAGE_DOWN, WID_GL_DESERT_COVERAGE_UP, WID_GL_DESERT_COVERAGE_DOWN, WIDGET_LIST_END}; for (const int *widget = raise_widgets; *widget != WIDGET_LIST_END; widget++) { if (this->IsWidgetLowered(*widget)) { this->RaiseWidget(*widget); @@ -869,7 +829,6 @@ struct GenerateLandscapeWindow : public Window { } else { /* An empty string means revert to the default */ switch (this->widget_id) { - case WID_GL_MAX_HEIGHTLEVEL_TEXT: value = DEF_MAX_HEIGHTLEVEL; break; case WID_GL_START_DATE_TEXT: value = DEF_START_YEAR; break; case WID_GL_SNOW_COVERAGE_TEXT: value = DEF_SNOW_COVERAGE; break; case WID_GL_DESERT_COVERAGE_TEXT: value = DEF_DESERT_COVERAGE; break; @@ -880,11 +839,6 @@ struct GenerateLandscapeWindow : public Window { } switch (this->widget_id) { - case WID_GL_MAX_HEIGHTLEVEL_TEXT: - this->SetWidgetDirty(WID_GL_MAX_HEIGHTLEVEL_TEXT); - _settings_newgame.construction.max_heightlevel = Clamp(value, MIN_MAX_HEIGHTLEVEL, MAX_MAX_HEIGHTLEVEL); - break; - case WID_GL_START_DATE_TEXT: this->SetWidgetDirty(WID_GL_START_DATE_TEXT); _settings_newgame.game_creation.starting_year = Clamp(value, MIN_YEAR, MAX_YEAR); diff --git a/src/lang/english.txt b/src/lang/english.txt index 6c01914c0..a8095e58f 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -2898,9 +2898,6 @@ STR_MAPGEN_BY :{BLACK}* STR_MAPGEN_NUMBER_OF_TOWNS :{BLACK}No. of towns: STR_MAPGEN_DATE :{BLACK}Date: STR_MAPGEN_NUMBER_OF_INDUSTRIES :{BLACK}No. of industries: -STR_MAPGEN_MAX_HEIGHTLEVEL :{BLACK}Maximum map height: -STR_MAPGEN_MAX_HEIGHTLEVEL_UP :{BLACK}Increase the maximum height of mountains on the map by one -STR_MAPGEN_MAX_HEIGHTLEVEL_DOWN :{BLACK}Decrease the maximum height of mountains on the map by one STR_MAPGEN_SNOW_COVERAGE :{BLACK}Snow coverage: STR_MAPGEN_SNOW_COVERAGE_UP :{BLACK}Increase snow coverage by ten percent STR_MAPGEN_SNOW_COVERAGE_DOWN :{BLACK}Decrease snow coverage by ten percent diff --git a/src/widgets/genworld_widget.h b/src/widgets/genworld_widget.h index dfc7b1a78..40e803ba7 100644 --- a/src/widgets/genworld_widget.h +++ b/src/widgets/genworld_widget.h @@ -26,10 +26,6 @@ enum GenerateLandscapeWidgets { WID_GL_GENERATE_BUTTON, ///< 'Generate' button. - WID_GL_MAX_HEIGHTLEVEL_DOWN, ///< Decrease max. heightlevel - WID_GL_MAX_HEIGHTLEVEL_TEXT, ///< Max. heightlevel - WID_GL_MAX_HEIGHTLEVEL_UP, ///< Increase max. heightlevel - WID_GL_START_DATE_DOWN, ///< Decrease start year. WID_GL_START_DATE_TEXT, ///< Start year. WID_GL_START_DATE_UP, ///< Increase start year. |