From 6cdf5b1fc587bfa7f3ed8b3388c232269946a5da Mon Sep 17 00:00:00 2001 From: IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> Date: Sun, 17 Jul 2022 06:33:18 +0200 Subject: small UI changes --- godot/scenes/Game.gd | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'godot/scenes/Game.gd') diff --git a/godot/scenes/Game.gd b/godot/scenes/Game.gd index 58c9e27..d2dc2ed 100644 --- a/godot/scenes/Game.gd +++ b/godot/scenes/Game.gd @@ -41,6 +41,11 @@ func _on_ResumeButton_pressed(): Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) +func _on_MainMenuButton_pressed(): + get_tree().paused = false + get_tree().change_scene("res://scenes/levels/MainMenu.tscn") + + func end_level(): # save current strokes and reset strokes_per_level[current_level_id] = current_strokes @@ -80,7 +85,7 @@ func next_level(): current_level_id = current_level_id + 1 if current_level_id >= NUM_LEVELS: - # TODO load main menu + get_tree().change_scene("res://scenes/levels/MainMenu.tscn") return # load next level -- cgit