aboutsummaryrefslogtreecommitdiff
path: root/client/menu/settings_menu.gd
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-06-29 21:42:17 +0200
committermetamuffin <metamuffin@disroot.org>2024-06-29 21:42:17 +0200
commitc0f9942cd4562b169a4dddfdc083e505dc465830 (patch)
treeabfaaf02350a5fbb4f4e90787f1c45055e024812 /client/menu/settings_menu.gd
parent95e008d419053a53e5e32c36751fae40eeec3725 (diff)
parent4e04980ea7d4548a305586ebf3fe9607c0840bd5 (diff)
downloadhurrycurry-c0f9942cd4562b169a4dddfdc083e505dc465830.tar
hurrycurry-c0f9942cd4562b169a4dddfdc083e505dc465830.tar.bz2
hurrycurry-c0f9942cd4562b169a4dddfdc083e505dc465830.tar.zst
Merge branch 'master' of https://codeberg.org/metamuffin/undercooked
Diffstat (limited to 'client/menu/settings_menu.gd')
-rw-r--r--client/menu/settings_menu.gd8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/menu/settings_menu.gd b/client/menu/settings_menu.gd
index 4c14a459..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,6 +43,10 @@ func update_rows():
row.connect("apply_preset", apply_preset)
options.add_child(row)
settings[k] = row
+
+ if fix_focus:
+ await get_tree().process_frame
+ Global.focus_first_button(self)
func apply_preset(preset: Dictionary):
for k in settings.keys():
@@ -51,4 +55,4 @@ func apply_preset(preset: Dictionary):
for k in preset.keys():
Global.settings[k]["value"] = preset[k]
- update_rows()
+ update_rows(true)