13 lines
285 B
GDScript3
13 lines
285 B
GDScript3
|
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)
|