diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fios_gui.cpp | 24 | ||||
-rw-r--r-- | src/lang/english.txt | 1 |
2 files changed, 18 insertions, 7 deletions
diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp index 9551bb843..9fce85ae9 100644 --- a/src/fios_gui.cpp +++ b/src/fios_gui.cpp @@ -133,9 +133,11 @@ static const NWidgetPart _nested_load_heightmap_dialog_widgets[] = { SetDataTip(0x0, STR_SAVELOAD_LIST_TOOLTIP), SetResize(1, 10), SetScrollbar(WID_SL_SCROLLBAR), EndContainer(), NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_SL_SCROLLBAR), EndContainer(), - NWidget(NWID_HORIZONTAL), - NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_CONTENT_DOWNLOAD), SetResize(1, 0), + NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), + NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_CONTENT_DOWNLOAD), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT), + NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_LOAD_BUTTON), SetResize(1, 0), SetFill(1, 0), + SetDataTip(STR_SAVELOAD_LOAD_BUTTON, STR_SAVELOAD_LOAD_HEIGHTMAP_TOOLTIP), NWidget(WWT_RESIZEBOX, COLOUR_GREY), EndContainer(), EndContainer(), @@ -521,16 +523,21 @@ public: break; case WID_SL_LOAD_BUTTON: - if (this->selected != NULL && !_load_check_data.HasErrors() && (_load_check_data.grf_compatibility != GLC_NOT_FOUND || _settings_client.gui.UserIsAllowedToChangeNewGRFs())) { - _switch_mode = (_game_mode == GM_EDITOR) ? SM_LOAD_SCENARIO : SM_LOAD_GAME; - + if (this->selected != NULL && !_load_check_data.HasErrors()) { const char *name = FiosBrowseTo(this->selected); SetFiosType(this->selected->type); strecpy(_file_to_saveload.name, name, lastof(_file_to_saveload.name)); strecpy(_file_to_saveload.title, this->selected->title, lastof(_file_to_saveload.title)); - ClearErrorMessages(); - delete this; + + if (_saveload_mode == SLD_LOAD_HEIGHTMAP) { + delete this; + ShowHeightmapLoad(); + } else if (_load_check_data.grf_compatibility != GLC_NOT_FOUND || _settings_client.gui.UserIsAllowedToChangeNewGRFs()) { + _switch_mode = (_game_mode == GM_EDITOR) ? SM_LOAD_SCENARIO : SM_LOAD_GAME; + ClearErrorMessages(); + delete this; + } } break; @@ -679,6 +686,9 @@ public: case 1: /* Selection changes */ if (!gui_scope) break; + if (_saveload_mode == SLD_LOAD_HEIGHTMAP) { + this->SetWidgetDisabledState(WID_SL_LOAD_BUTTON, this->selected == NULL || _load_check_data.HasErrors()); + } if (_saveload_mode == SLD_LOAD_GAME || _saveload_mode == SLD_LOAD_SCENARIO) { this->SetWidgetDisabledState(WID_SL_LOAD_BUTTON, this->selected == NULL || _load_check_data.HasErrors() || !(_load_check_data.grf_compatibility != GLC_NOT_FOUND || _settings_client.gui.UserIsAllowedToChangeNewGRFs())); diff --git a/src/lang/english.txt b/src/lang/english.txt index f1ef46ccf..198515a34 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -2668,6 +2668,7 @@ STR_SAVELOAD_SAVE_BUTTON :{BLACK}Save STR_SAVELOAD_SAVE_TOOLTIP :{BLACK}Save the current game, using the selected name STR_SAVELOAD_LOAD_BUTTON :{BLACK}Load STR_SAVELOAD_LOAD_TOOLTIP :{BLACK}Load the selected game +STR_SAVELOAD_LOAD_HEIGHTMAP_TOOLTIP :{BLACK}Load the selected heightmap STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Game Details STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}No information available STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING1} |