From 02e4687f4f3046ee04d11401ef94a94927a76670 Mon Sep 17 00:00:00 2001 From: tpart Date: Thu, 4 Jul 2024 09:23:46 +0200 Subject: Save and apply settings when using back button --- client/menu/settings.gd | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'client/menu') diff --git a/client/menu/settings.gd b/client/menu/settings.gd index 1835d620..9e1b0706 100644 --- a/client/menu/settings.gd +++ b/client/menu/settings.gd @@ -17,14 +17,17 @@ extends Menu @onready var options: VBoxContainer = $OuterGap/Panel/InnerGap/VBoxContainer/ScrollContainer/Options +func _ready(): + super() + update_rows() + func _on_back_pressed(): - Global.save_settings() - Global.apply_settings() exit() -func _ready(): +func exit(): + Global.save_settings() + Global.apply_settings() super() - update_rows() func update_rows(fix_focus = false): for c in options.get_children(): -- cgit v1.2.3-70-g09d2