Files
gymkhana-actions/game/ui/ui_9verbs/verbs_menu.gd
Julian Murgia bd3ef71c80 Added hover stack to manage overlapping Area2Ds
Added room selector in demo scenes
Modified dialogues in room 1, fixed bug in room 8 and 9
2021-02-03 18:19:40 +01:00

23 lines
569 B
GDScript

tool
extends Control
"""
This script is out of Escoria's scope. It controls the UI reaction to an
UI event (eg right click) to change the cursor accordingly.
"""
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)
func unselect_actions():
for but in $actions.get_children():
but.set_pressed(false)