diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-06-03 18:34:24 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-06-08 17:55:46 +0300 |
commit | e00571b194720f2df8e0b483bea61c3b555cf5cd (patch) | |
tree | 5d560b3ba33f7e22595b7112538e5138e398c25d /editor/editor_run_native.cpp | |
parent | 4e3b0e176b531261bea543fd497677dee3b13487 (diff) | |
download | redot-engine-e00571b194720f2df8e0b483bea61c3b555cf5cd.tar.gz |
Add readable export errors.
Diffstat (limited to 'editor/editor_run_native.cpp')
-rw-r--r-- | editor/editor_run_native.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp index 5db7b8673f..6ce9e5fa6f 100644 --- a/editor/editor_run_native.cpp +++ b/editor/editor_run_native.cpp @@ -151,7 +151,13 @@ Error EditorRunNative::run_native(int p_idx, int p_platform) { flags |= EditorExportPlatform::DEBUG_FLAG_VIEW_NAVIGATION; } - return eep->run(preset, p_idx, flags); + eep->clear_messages(); + Error err = eep->run(preset, p_idx, flags); + result_dialog_log->clear(); + if (eep->fill_log_messages(result_dialog_log, err)) { + result_dialog->popup_centered_ratio(0.5); + } + return err; } void EditorRunNative::resume_run_native() { @@ -167,6 +173,15 @@ bool EditorRunNative::is_deploy_debug_remote_enabled() const { } EditorRunNative::EditorRunNative() { + result_dialog = memnew(AcceptDialog); + result_dialog->set_title(TTR("Project Run")); + result_dialog_log = memnew(RichTextLabel); + result_dialog_log->set_custom_minimum_size(Size2(300, 80) * EDSCALE); + result_dialog->add_child(result_dialog_log); + + add_child(result_dialog); + result_dialog->hide(); + set_process(true); resume_idx = 0; resume_platform = 0; |