From c8a316e4b8987dad963656a34665fa0e23dedcb1 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Mon, 22 Apr 2024 16:34:25 +0200 Subject: update --- Scenes/UI/Menu.gd | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Scenes/UI') diff --git a/Scenes/UI/Menu.gd b/Scenes/UI/Menu.gd index 00bcc2f..534b50c 100644 --- a/Scenes/UI/Menu.gd +++ b/Scenes/UI/Menu.gd @@ -24,11 +24,20 @@ func _input(_event: InputEvent): if Input.is_action_pressed("ui_menu_right"): if get_current_tab() < get_tab_count() - 1: set_current_tab(get_current_tab() + 1) + + connect("tab_changed", func(tab_id): + if tab_id == 0: + (func(): $Bombs/Panel/HBoxContainer/VBoxContainer/ButtonBombNormal.grab_focus()).call_deferred() + elif tab_id == 1: + (func(): $System/Panel/VBoxContainer/ButtonResume.grab_focus()).call_deferred() + ) func open_menu(): get_tree().paused = true show() + + (func(): $Bombs/Panel/HBoxContainer/VBoxContainer/ButtonBombNormal.grab_focus()).call_deferred() func close_menu(): -- cgit v1.2.3