diff options
Diffstat (limited to 'client/menu/settings_menu.gd')
-rw-r--r-- | client/menu/settings_menu.gd | 8 |
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) |