diff options
Diffstat (limited to 'Scenes/UI/Menu.gd')
-rw-r--r-- | Scenes/UI/Menu.gd | 9 |
1 files changed, 9 insertions, 0 deletions
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(): |