From 3517dbd9c5f88cd59fcd63902833d7d3a81f0204 Mon Sep 17 00:00:00 2001 From: betalars Date: Tue, 19 Aug 2025 10:17:11 +0200 Subject: [PATCH] #222 focus handling to demo scene --- src/demo-main.tscn | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/demo-main.tscn b/src/demo-main.tscn index 83aef099..4e0e2314 100644 --- a/src/demo-main.tscn +++ b/src/demo-main.tscn @@ -128,15 +128,21 @@ func show_accessibility_settings(): %Accessibility.is_active = true await %Accessibility.leave_stage %AccessibilityContainer.hide() + if in_game: + %ResumeButton.grab_focus() + else: + $Menu/VBoxContainer2/PressStart.grab_focus() func toggle_pause_menu(): if not get_tree().paused: get_tree().paused = true %PauseContainer.show() + %ResumeButton.grab_focus() Input.mouse_mode = Input.MOUSE_MODE_VISIBLE else: get_tree().paused = false %PauseContainer.hide() + %ResumeButton.grab_focus() if State.stage_list[0] is Player: Input.mouse_mode = Input.MOUSE_MODE_CAPTURED