diff options
Diffstat (limited to 'client')
| -rw-r--r-- | client/global.gd | 3 | ||||
| -rw-r--r-- | client/settings.gd | 4 | 
2 files changed, 6 insertions, 1 deletions
| diff --git a/client/global.gd b/client/global.gd index 47d9da06..7629b05d 100644 --- a/client/global.gd +++ b/client/global.gd @@ -55,7 +55,6 @@ var focused_node: Control  func _ready():  	profile = load_dict("user://profile", default_profile) -	settings_tree = Settings.get_root()  	load_settings("user://settings")  	get_viewport().gui_focus_changed.connect(Sound.play_hover_maybe) @@ -120,7 +119,9 @@ func load_settings(path: String):  	else:  		print("No settings file found.")  		settings = {} +	settings_tree = Settings.get_root()  	settings_tree.check() +	Settings.apply_initial()  	save_settings()  func on_mobile() -> bool: diff --git a/client/settings.gd b/client/settings.gd index bfa25a00..828ecb62 100644 --- a/client/settings.gd +++ b/client/settings.gd @@ -86,6 +86,10 @@ static var change_hooks_apply = {  	"audio.sfx_volume": h_volume_sfx,  } +static func apply_initial(): +	for key in change_hooks_apply.keys(): +		change_hooks_apply[key].call(Global.get_setting(key)) +  static func h_aa(mode):  	match mode:  		"disabled": | 
