Merge pull request #93523 from KoBeWi/a_feature_nobody_wanted_and_also_nobody_needed
Add brief description tooltips to EditorResourcePicker
This commit is contained in:
commit
2542a07e70
|
@ -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<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++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue