summaryrefslogtreecommitdiffstats
path: root/pause_menu_system.gd
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-11-29 14:10:32 +0200
committerJan Tuomi <jan@jantuomi.fi>2025-11-29 14:10:32 +0200
commitb532e98ecdbd449da63962cc6db3feef62dbe857 (patch)
tree99acd309a6cf5e3348a3645fa9a3911a73c27892 /pause_menu_system.gd
parentcddd0a496fcc6404f1024c4e515f1e20a31a2d6c (diff)
Rework pause menu
Diffstat (limited to 'pause_menu_system.gd')
-rw-r--r--pause_menu_system.gd13
1 files changed, 13 insertions, 0 deletions
diff --git a/pause_menu_system.gd b/pause_menu_system.gd
new file mode 100644
index 0000000..404fe28
--- /dev/null
+++ b/pause_menu_system.gd
@@ -0,0 +1,13 @@
+class_name PauseMenuSystem
+extends PauseMenuPage
+
+func _on_tree_entered() -> void:
+ $QuitButton.grab_focus.call_deferred()
+ $QuitButton.connect("pressed", _on_quit_button_pressed)
+
+func _on_quit_button_pressed() -> void:
+ var menu: PauseMenu = get_parent()
+ var top: Top = menu.get_parent()
+
+ top.get_transition_player().room_transition(null, "res://room_main_menu.tscn", null)
+ top.handle_pause()