Skip to content

Commit

Permalink
Add brief description tooltips to EditorResourcePicker
Browse files Browse the repository at this point in the history
  • Loading branch information
KoBeWi committed Jun 24, 2024
1 parent e78dc83 commit 40be5c4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions editor/editor_resource_picker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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<String, DocData::ClassDoc>::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++;
}

Expand Down

0 comments on commit 40be5c4

Please sign in to comment.