allow pausing with escape

This commit is contained in:
Arnaud Vergnet 2021-04-09 11:33:19 +02:00
parent df6a44bc8e
commit 332ad6382d

View file

@ -17,6 +17,9 @@ func _input(event: InputEvent):
if event.is_action_pressed("ui_cancel") and visible:
unpause()
get_tree().set_input_as_handled()
elif event.is_action_pressed("ui_cancel") and not visible:
pause()
get_tree().set_input_as_handled()
func _on_BackgroundButton_pressed():