diff options
author | Jakob Sinclair <sinclair.jakob@mailbox.org> | 2017-10-13 00:38:42 +0200 |
---|---|---|
committer | Jakob Sinclair <sinclair.jakob@mailbox.org> | 2017-10-13 00:40:19 +0200 |
commit | a5cabaeb8ddd05ce691dbdd0c676df6fc3cb0938 (patch) | |
tree | 60f20f31c686eefe5b4cc4ad2e452b508d81102a /editor | |
parent | 79e247d74e775c2fe75d1dd499240e8782f0f44b (diff) |
Added error dialog when failing to export project
Fixes #11836
Signed-off-by: Jakob Sinclair <sinclair.jakob@mailbox.org>
Diffstat (limited to 'editor')
-rw-r--r-- | editor/project_export.cpp | 12 | ||||
-rw-r--r-- | editor/project_export.h | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/editor/project_export.cpp b/editor/project_export.cpp index e5b6f8e406..d8a87e738f 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -733,8 +733,12 @@ void ProjectExportDialog::_export_project_to_path(const String &p_path) { ERR_FAIL_COND(platform.is_null()); Error err = platform->export_project(current, export_debug->is_pressed(), p_path, 0); - if (err != OK) + if (err != OK) { + error_dialog->set_text(TTR("Export templates for this platform are missing/corrupted: ") + platform->get_name()); + error_dialog->show(); + error_dialog->popup_centered_minsize(Size2(300, 80)); ERR_PRINT("Failed to export project"); + } } void ProjectExportDialog::_bind_methods() { @@ -940,6 +944,12 @@ ProjectExportDialog::ProjectExportDialog() { export_error2->add_color_override("font_color", get_color("error_color", "Editor")); export_error2->set_text(" - " + TTR("Export templates for this platform are missing:") + " "); + error_dialog = memnew(AcceptDialog); + error_dialog->set_title("Error"); + error_dialog->set_text(TTR("Export templates for this platform are missing/corrupted:") + " "); + main_vb->add_child(error_dialog); + error_dialog->hide(); + LinkButton *download_templates = memnew(LinkButton); download_templates->set_text(TTR("Manage Export Templates")); export_templates_error->add_child(download_templates); diff --git a/editor/project_export.h b/editor/project_export.h index 61de0f739a..288b0c290f 100644 --- a/editor/project_export.h +++ b/editor/project_export.h @@ -72,6 +72,7 @@ private: Button *button_export; bool updating; + AcceptDialog *error_dialog; ConfirmationDialog *delete_confirm; OptionButton *export_filter; |