13 lines
No EOL
285 B
GDScript
13 lines
No EOL
285 B
GDScript
extends MenuButton
|
|
|
|
var popup
|
|
|
|
func _ready():
|
|
popup = get_popup()
|
|
popup.add_item("item a")
|
|
popup.add_item("item b")
|
|
popup.add_item("item c")
|
|
# popup.connect("item_pressed", self, "_on_item_pressed")
|
|
|
|
func _on_item_pressed(ID):
|
|
self.text = popup.get_item_text(ID) |