diff options
Diffstat (limited to 'game/src/OptionMenu/SettingNodes/SettingHSlider.gd')
-rw-r--r-- | game/src/OptionMenu/SettingNodes/SettingHSlider.gd | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/game/src/OptionMenu/SettingNodes/SettingHSlider.gd b/game/src/OptionMenu/SettingNodes/SettingHSlider.gd index da9348f..cf2adf4 100644 --- a/game/src/OptionMenu/SettingNodes/SettingHSlider.gd +++ b/game/src/OptionMenu/SettingNodes/SettingHSlider.gd @@ -10,10 +10,17 @@ var setting_name : String = "SettingHSlider" @export var default_value : float = 0 +func _ready(): + Events.Options.load_settings.connect(load_setting) + Events.Options.save_settings.connect(save_setting) + Events.Options.reset_settings.connect(reset_setting) + func load_setting(file : ConfigFile): + if file == null: return value = file.get_value(section_name, setting_name, default_value) func save_setting(file : ConfigFile): + if file == null: return file.set_value(section_name, setting_name, value) func reset_setting(): |