summaryrefslogtreecommitdiff
path: root/Scenes/UI
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-04-22 16:34:25 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-04-22 16:34:25 +0200
commitc8a316e4b8987dad963656a34665fa0e23dedcb1 (patch)
tree569af4b4f37d21079b6aedfad5164e94b50b6cb8 /Scenes/UI
parentf27937e6e9b6a7146dd09fc711d2d293ecf5abbf (diff)
update
Diffstat (limited to 'Scenes/UI')
-rw-r--r--Scenes/UI/Menu.gd9
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():