Skip to content

Commit

Permalink
ui: Fix retry so that you don't accidentally quit to the main menu
Browse files Browse the repository at this point in the history
  • Loading branch information
flexiondotorg committed Jul 10, 2021
1 parent 0d09bd2 commit 84db32c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/ui/UI.gd
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ func _unhandled_input(event: InputEvent):
# Prevents other input being handled while paused
scene_tree.set_input_as_handled()
elif paused and event.is_action_pressed("ui_accept"):
_on_Retry_button_up()
elif paused and event.is_action_pressed("ui_cancel"):
get_tree().change_scene("res://code/MainScreen.tscn")


Expand All @@ -116,6 +118,7 @@ func end_of_game(message: String):
yield($GameOver, "finished")
PlayerData.new_game()
set_paused(false)
get_tree().change_scene("res://code/MainScreen.tscn")


func end_of_level():
Expand Down

0 comments on commit 84db32c

Please # to comment.