extends MenuButton # You can also add items programmatically if needed func _on_item_pressed(index): match index: 0: print("Option 1 selected") 1: print("Option 2 selected") 2: print("Option 3 selected")