aboutsummaryrefslogtreecommitdiff
path: root/client/menu
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-06-29 21:30:39 +0200
committertpart <tpart120@proton.me>2024-06-29 21:30:39 +0200
commita4b59d744a2f07a4ff8f49ac608765f2052cc8bb (patch)
tree2e1e13f7710bb4e74a9e7cbf2aa97df9f7bace55 /client/menu
parentfde874b3de5f969092a57ff2edcf57c0aff4e2e9 (diff)
downloadhurrycurry-a4b59d744a2f07a4ff8f49ac608765f2052cc8bb.tar
hurrycurry-a4b59d744a2f07a4ff8f49ac608765f2052cc8bb.tar.bz2
hurrycurry-a4b59d744a2f07a4ff8f49ac608765f2052cc8bb.tar.zst
Fix focus breaking in main menu
Diffstat (limited to 'client/menu')
-rw-r--r--client/menu/settings_menu.gd11
1 files changed, 6 insertions, 5 deletions
diff --git a/client/menu/settings_menu.gd b/client/menu/settings_menu.gd
index b433951f..68f3f2fc 100644
--- a/client/menu/settings_menu.gd
+++ b/client/menu/settings_menu.gd
@@ -32,7 +32,7 @@ func _ready():
func show_graphis():
menu_manager.goto("settings_graphics")
-func update_rows():
+func update_rows(fix_focus = false):
for c in options.get_children():
c.queue_free()
@@ -43,9 +43,10 @@ func update_rows():
row.connect("apply_preset", apply_preset)
options.add_child(row)
settings[k] = row
- await get_tree().process_frame
- Global.focus_first_button(self)
-
+
+ if fix_focus:
+ await get_tree().process_frame
+ Global.focus_first_button(self)
func apply_preset(preset: Dictionary):
for k in settings.keys():
@@ -54,4 +55,4 @@ func apply_preset(preset: Dictionary):
for k in preset.keys():
Global.settings[k]["value"] = preset[k]
- update_rows()
+ update_rows(true)