mirror of
https://github.com/godotengine/godot
synced 2024-09-16 01:45:04 +00:00
Add brief description tooltips to EditorResourcePicker
This commit is contained in:
parent
e78dc83ee8
commit
40be5c4681
|
@ -31,6 +31,7 @@
|
||||||
#include "editor_resource_picker.h"
|
#include "editor_resource_picker.h"
|
||||||
|
|
||||||
#include "editor/audio_stream_preview.h"
|
#include "editor/audio_stream_preview.h"
|
||||||
|
#include "editor/editor_help.h"
|
||||||
#include "editor/editor_node.h"
|
#include "editor/editor_node.h"
|
||||||
#include "editor/editor_quick_open.h"
|
#include "editor/editor_quick_open.h"
|
||||||
#include "editor/editor_resource_preview.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;
|
int id = TYPE_BASE_ID + idx;
|
||||||
edit_menu->add_icon_item(icon, vformat(TTR("New %s"), t), id);
|
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++;
|
idx++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue