From a2313d9a14909d6f51b2332773d6f214fc227c8e Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Sat, 3 Sep 2022 13:11:50 +0200 Subject: [PATCH] Show configuration warnings in editor --- editor/limbo_ai_editor_plugin.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/editor/limbo_ai_editor_plugin.cpp b/editor/limbo_ai_editor_plugin.cpp index bb1fd59..ffa3f54 100644 --- a/editor/limbo_ai_editor_plugin.cpp +++ b/editor/limbo_ai_editor_plugin.cpp @@ -63,7 +63,13 @@ void TaskTree::_update_item(TreeItem *p_item) { p_item->set_icon(0, task->get_icon()); p_item->set_editable(0, false); - // TODO: Update configuration warning. + for (int i = 0; i < p_item->get_button_count(0); i++) { + p_item->erase_button(0, i); + } + String warning = task->get_configuration_warning(); + if (!warning.empty()) { + p_item->add_button(0, get_icon("NodeWarning", "EditorIcons"), 0, false, warning); + } // TODO: Update probabilities. }