Files
gymkhana-actions/game/ui/ui_9verbs/verbs_menu.gd

15 lines
340 B
GDScript

tool
extends Control
func _ready():
for but in $actions.get_children():
but.connect("pressed", self, "_on_action_selected", [but.name])
but.toggle_mode = true
func _on_action_selected(action : String):
escoria.esc_runner.set_current_action(action)
for but in $actions.get_children():
but.set_pressed(but.get_name() == action)