Add error dialog
This commit is contained in:
parent
4c937d3660
commit
3fafeb5bd8
|
@ -7,3 +7,4 @@ ColumnLimit: 120
|
|||
---
|
||||
Language: Cpp
|
||||
AccessModifierOffset: -4
|
||||
IndentCaseLabels: true
|
||||
|
|
|
@ -49,6 +49,36 @@ void InstallerFrame::perform_install(const wxCommandEvent &) {
|
|||
|
||||
if (result == InstallerResult::OK) {
|
||||
wxMessageBox(_("Reopen the launcher and FrogLoader should be available."), _("Installation Complete"));
|
||||
} else {
|
||||
wxString message;
|
||||
|
||||
switch (result) {
|
||||
case InstallerResult::CouldntCreateLauncherDataDir:
|
||||
message = _("Failed to create launcher data directory");
|
||||
break;
|
||||
case InstallerResult::CouldntCreateVersionDir:
|
||||
message = _("Failed to create versions directory");
|
||||
break;
|
||||
case InstallerResult::CouldntWriteVersion:
|
||||
message = _("Failed to write version");
|
||||
break;
|
||||
case InstallerResult::CouldntReadLauncherProfiles:
|
||||
message = _("Failed to read launcher profiles");
|
||||
break;
|
||||
case InstallerResult::CouldntWriteLauncherProfiles:
|
||||
message = _("Failed to write launcher profiles");
|
||||
break;
|
||||
case InstallerResult::CouldntCreateInstallationDir:
|
||||
message = _("Failed to create game directory");
|
||||
break;
|
||||
}
|
||||
|
||||
if (!message.IsEmpty())
|
||||
message = wxString::Format(_("An error occurred during installation: %s."), message);
|
||||
else
|
||||
message = _("An error occured during installation.");
|
||||
|
||||
wxMessageBox(message, _("Installation Failed"), wxICON_ERROR | wxOK | wxCENTRE);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue