diff options
author | flow <flowlnlnln@gmail.com> | 2022-07-31 20:29:12 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2022-09-20 18:36:09 -0300 |
commit | eda6cf11ef53c11ed2691399ec1adbc83ca0a4d6 (patch) | |
tree | e6ccd43f4292f5e85b1f0bc637ca9ad96f61826a /launcher/modplatform/flame | |
parent | 68facd6b93d1a08a7c2417aa0d0ec614b0feecbe (diff) | |
download | PrismLauncher-eda6cf11ef53c11ed2691399ec1adbc83ca0a4d6.tar.gz PrismLauncher-eda6cf11ef53c11ed2691399ec1adbc83ca0a4d6.tar.bz2 PrismLauncher-eda6cf11ef53c11ed2691399ec1adbc83ca0a4d6.zip |
feat(ui): improve info dialog before updating an instance
Adds a 'Cancel' option, and add a note about doing a backup before
updating.
Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/modplatform/flame')
-rw-r--r-- | launcher/modplatform/flame/FlameInstanceCreationTask.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/launcher/modplatform/flame/FlameInstanceCreationTask.cpp b/launcher/modplatform/flame/FlameInstanceCreationTask.cpp index c8b2e297..22ee0998 100644 --- a/launcher/modplatform/flame/FlameInstanceCreationTask.cpp +++ b/launcher/modplatform/flame/FlameInstanceCreationTask.cpp @@ -66,16 +66,25 @@ bool FlameCreationTask::updateInstance() auto version_id = inst->getManagedPackVersionName(); auto version_str = !version_id.isEmpty() ? tr(" (version %1)").arg(version_id) : ""; - auto info = CustomMessageBox::selectable(m_parent, tr("Similar modpack was found!"), - tr("One or more of your instances are from this same modpack%1. Do you want to create a " - "separate instance, or update the existing one?") - .arg(version_str), - QMessageBox::Information, QMessageBox::Ok | QMessageBox::Abort); + auto info = CustomMessageBox::selectable( + m_parent, tr("Similar modpack was found!"), + tr("One or more of your instances are from this same modpack%1. Do you want to create a " + "separate instance, or update the existing one?\n\nNOTE: Make sure you made a backup of your important instance data before " + "updating, as worlds can be corrupted and some configuration may be lost (due to pack overrides).") + .arg(version_str), QMessageBox::Information, QMessageBox::Ok | QMessageBox::Reset | QMessageBox::Abort); info->setButtonText(QMessageBox::Ok, tr("Update existing instance")); info->setButtonText(QMessageBox::Abort, tr("Create new instance")); + info->setButtonText(QMessageBox::Reset, tr("Cancel")); - if (info->exec() && info->clickedButton() == info->button(QMessageBox::Abort)) + info->exec(); + + if (info->clickedButton() == info->button(QMessageBox::Abort)) + return false; + + if (info->clickedButton() == info->button(QMessageBox::Reset)) { + m_abort = true; return false; + } QDir old_inst_dir(inst->instanceRoot()); |