mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Add methods to add submenus without using names
This commit is contained in:
parent
9c626b6236
commit
aeec3c1309
21 changed files with 166 additions and 223 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue