From 107b94fad69f04ef4951ab2ef070af1fb961b146 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Fri, 18 Aug 2023 18:53:55 +0200 Subject: [PATCH] Emphasize tasks with custom name set --- editor/limbo_ai_editor_plugin.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/editor/limbo_ai_editor_plugin.cpp b/editor/limbo_ai_editor_plugin.cpp index e7f5807..935672a 100644 --- a/editor/limbo_ai_editor_plugin.cpp +++ b/editor/limbo_ai_editor_plugin.cpp @@ -94,6 +94,13 @@ void TaskTree::_update_item(TreeItem *p_item) { Ref task = p_item->get_metadata(0); ERR_FAIL_COND_MSG(!task.is_valid(), "Invalid task reference in metadata."); p_item->set_text(0, task->get_task_name()); + if (task->get_custom_name().is_empty()) { + p_item->set_custom_font(0, nullptr); + // p_item->clear_custom_color(0); + } else { + p_item->set_custom_font(0, (get_theme_font(SNAME("bold"), SNAME("EditorFonts")))); + // p_item->set_custom_color(0, get_theme_color(SNAME("warning_color"), SNAME("Editor"))); + } String type_arg; if (task->get_script_instance() && !task->get_script_instance()->get_script()->get_path().is_empty()) { type_arg = task->get_script_instance()->get_script()->get_path();