mirror of
https://github.com/OpenTTD/OpenTTD
synced 2025-12-22 12:42:43 +01:00
Codechange: Use EncodedString for Query window. (#13528)
This removes the need to separately capture and store global parameters.
This commit is contained in:
@@ -825,14 +825,20 @@ public:
|
||||
if (this->abstract_filetype == FT_SAVEGAME || this->abstract_filetype == FT_SCENARIO) {
|
||||
_file_to_saveload.name = FiosMakeSavegameName(this->filename_editbox.text.GetText());
|
||||
if (FioCheckFileExists(_file_to_saveload.name, Subdirectory::SAVE_DIR)) {
|
||||
ShowQuery(STR_SAVELOAD_OVERWRITE_TITLE, STR_SAVELOAD_OVERWRITE_WARNING, this, SaveLoadWindow::SaveGameConfirmationCallback);
|
||||
ShowQuery(
|
||||
GetEncodedString(STR_SAVELOAD_OVERWRITE_TITLE),
|
||||
GetEncodedString(STR_SAVELOAD_OVERWRITE_WARNING),
|
||||
this, SaveLoadWindow::SaveGameConfirmationCallback);
|
||||
} else {
|
||||
_switch_mode = SM_SAVE_GAME;
|
||||
}
|
||||
} else {
|
||||
_file_to_saveload.name = FiosMakeHeightmapName(this->filename_editbox.text.GetText());
|
||||
if (FioCheckFileExists(_file_to_saveload.name, Subdirectory::SAVE_DIR)) {
|
||||
ShowQuery(STR_SAVELOAD_OVERWRITE_TITLE, STR_SAVELOAD_OVERWRITE_WARNING, this, SaveLoadWindow::SaveHeightmapConfirmationCallback);
|
||||
ShowQuery(
|
||||
GetEncodedString(STR_SAVELOAD_OVERWRITE_TITLE),
|
||||
GetEncodedString(STR_SAVELOAD_OVERWRITE_WARNING),
|
||||
this, SaveLoadWindow::SaveHeightmapConfirmationCallback);
|
||||
} else {
|
||||
_switch_mode = SM_SAVE_HEIGHTMAP;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user