You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Add methods to add submenus without using names
This commit is contained in:
@@ -723,7 +723,7 @@ void EditorPropertyOTFeatures::update_property() {
|
||||
}
|
||||
for (int i = 0; i < FGRP_MAX; i++) {
|
||||
if (have_sub[i]) {
|
||||
menu->add_submenu_item(RTR(group_names[i]), "FTRMenu_" + itos(i));
|
||||
menu->add_submenu_node_item(RTR(group_names[i]), menu_sub[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -851,7 +851,6 @@ EditorPropertyOTFeatures::EditorPropertyOTFeatures() {
|
||||
|
||||
for (int i = 0; i < FGRP_MAX; i++) {
|
||||
menu_sub[i] = memnew(PopupMenu);
|
||||
menu_sub[i]->set_name("FTRMenu_" + itos(i));
|
||||
menu->add_child(menu_sub[i]);
|
||||
menu_sub[i]->connect("id_pressed", callable_mp(this, &EditorPropertyOTFeatures::_add_feature));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user