I have a little question about combination with double menu:
I use the: MenuButton like a prent script, and PopupMenu like a child.
How it looks now:
View how it must to be:
With ability to when I'm select the item from second popup menu, it must be setted to that place if its possible.
Thank you very much gyus! I LOVE YOU ALL - KAPU! xD
My problem is: WHen Im create a popup list, he is not show their elements on my MenuButton popup list. (No arrow, no child elements)
So let me get this straight: if a user clicks on an item from the "countrylist", that item appears in the "villagelist"?
Try to draw the scheme:
Could you please show me how you have laid out the Control nodes (for example, the MenuButton, PopupMenu, and ItemList nodes)? I need to know how one list flows into another list.
It looks like you need GDscript and a signal for when an item of the MenuButton is selected. It could go something like this:
# Access the "country_menu" PopupMenu through this.
var country_list_popup_menu: PopupMenu = $country_list.get_popup()
# Signal for when the user selects an PopupMenu item.
country_list_popup_menu.connect("id_pressed", self, "_on_country_selected")
# Function that handles the item selected.
func _on_country_selected( id ):
# Code for populating the Dropdown menu or the ItemList. Use the "id" parameter to get which item was selected in the MenuButton.
I donw know what happening, but link ButtonMenu + child PopupMenu - doesnt work correctly if you create them from GUI.
I solve my problem by fully using code for it. Parent MenuButton was created by GUI and child PopupMenu - by code.
$ The problem in log: "node not found", he just can't see a child node if i set them by any ways except New.
1. var node = get_node("sublist") #error not see
2. onready var node = $sublist #error not see
But if you create it by GDScript - no errors all is fine.
SO if any people meet with that problem, the solve looks like:
If you want to do something like that.
Thanks anyway for hearing my call!