You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #104604 from KoBeWi/why_new
Remove New prefix from EditorResourcePicker
This commit is contained in:
@@ -506,6 +506,9 @@ void EditorResourcePicker::set_create_options(Object *p_menu_node) {
|
|||||||
|
|
||||||
_ensure_allowed_types();
|
_ensure_allowed_types();
|
||||||
HashSet<StringName> allowed_types = allowed_types_without_convert;
|
HashSet<StringName> allowed_types = allowed_types_without_convert;
|
||||||
|
if (!allowed_types.is_empty()) {
|
||||||
|
edit_menu->add_separator(TTRC("New"));
|
||||||
|
}
|
||||||
|
|
||||||
for (const StringName &E : allowed_types) {
|
for (const StringName &E : allowed_types) {
|
||||||
const String &t = E;
|
const String &t = E;
|
||||||
@@ -518,7 +521,8 @@ void EditorResourcePicker::set_create_options(Object *p_menu_node) {
|
|||||||
|
|
||||||
Ref<Texture2D> icon = EditorNode::get_singleton()->get_class_icon(t, "Object");
|
Ref<Texture2D> icon = EditorNode::get_singleton()->get_class_icon(t, "Object");
|
||||||
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, t, id);
|
||||||
|
edit_menu->set_item_auto_translate_mode(-1, AUTO_TRANSLATE_MODE_DISABLED);
|
||||||
|
|
||||||
HashMap<String, DocData::ClassDoc>::Iterator class_doc = EditorHelp::get_doc_data()->class_list.find(t);
|
HashMap<String, DocData::ClassDoc>::Iterator class_doc = EditorHelp::get_doc_data()->class_list.find(t);
|
||||||
if (class_doc) {
|
if (class_doc) {
|
||||||
|
|||||||
Reference in New Issue
Block a user