From 40be5c4681aa9c6d93b1ccc3a9e6a52ff36bcd62 Mon Sep 17 00:00:00 2001 From: kobewi Date: Sun, 23 Jun 2024 21:00:14 +0200 Subject: [PATCH] Add brief description tooltips to EditorResourcePicker --- editor/editor_resource_picker.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp index 46fe2225d0e1..a895219e6fca 100644 --- a/editor/editor_resource_picker.cpp +++ b/editor/editor_resource_picker.cpp @@ -31,6 +31,7 @@ #include "editor_resource_picker.h" #include "editor/audio_stream_preview.h" +#include "editor/editor_help.h" #include "editor/editor_node.h" #include "editor/editor_quick_open.h" #include "editor/editor_resource_preview.h" @@ -504,6 +505,11 @@ void EditorResourcePicker::set_create_options(Object *p_menu_node) { int id = TYPE_BASE_ID + idx; edit_menu->add_icon_item(icon, vformat(TTR("New %s"), t), id); + HashMap::Iterator class_doc = EditorHelp::get_doc_data()->class_list.find(t); + if (class_doc) { + edit_menu->set_item_tooltip(-1, DTR(class_doc->value.brief_description)); + } + idx++; }