allow pausing with escape
This commit is contained in:
parent
df6a44bc8e
commit
332ad6382d
1 changed files with 3 additions and 0 deletions
|
@ -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():
|
||||
|
|
Loading…
Reference in a new issue