GraphicsEditor/addons/graphics_editor/MenuButtonExtended.gd

14 lines
218 B
GDScript3
Raw Normal View History

2019-08-04 09:57:42 +02:00
tool
extends MenuButton
2019-08-05 02:16:14 +02:00
var popup = get_popup()
2019-08-04 09:57:42 +02:00
signal item_pressed
func _ready():
popup.connect("id_pressed", self, "id_pressed")
func id_pressed(id):
2019-11-23 12:33:43 +01:00
emit_signal("item_pressed", name, popup.get_item_text(id))
2020-10-25 18:39:10 +01:00