diff options
Diffstat (limited to 'editor/project_export.cpp')
-rw-r--r-- | editor/project_export.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/editor/project_export.cpp b/editor/project_export.cpp index 2d6775d02e..9bd8c1e227 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -265,10 +265,25 @@ void ProjectExportDialog::_edit_preset(int p_index) { export_templates_error->hide(); } + export_warning->hide(); export_button->set_disabled(true); get_ok_button()->set_disabled(true); - } else { + if (error != String()) { + Vector<String> items = error.split("\n", false); + error = ""; + for (int i = 0; i < items.size(); i++) { + if (i > 0) { + error += "\n"; + } + error += " - " + items[i]; + } + export_warning->set_text(error); + export_warning->show(); + } else { + export_warning->hide(); + } + export_error->hide(); export_templates_error->hide(); export_button->set_disabled(false); @@ -1247,6 +1262,11 @@ ProjectExportDialog::ProjectExportDialog() { export_error->hide(); export_error->add_theme_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("error_color"), SNAME("Editor"))); + export_warning = memnew(Label); + main_vb->add_child(export_warning); + export_warning->hide(); + export_warning->add_theme_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("warning_color"), SNAME("Editor"))); + export_templates_error = memnew(HBoxContainer); main_vb->add_child(export_templates_error); export_templates_error->hide(); |