aboutsummaryrefslogtreecommitdiff
path: root/game/src/OptionMenu
diff options
context:
space:
mode:
author George L. Albany <Megacake1234@gmail.com>2023-05-16 22:32:10 +0200
committer GitHub <noreply@github.com>2023-05-16 22:32:10 +0200
commit9d320ea23c2d34907f3a3a4ee4daa775e63473d2 (patch)
tree7679c70c26722230047eca6df3f72a3efcd92795 /game/src/OptionMenu
parent1e490997cda95c6064d56eaba57d60737653e266 (diff)
parentbcd60b398c4d518c188dccf535f0d0b330ae2cf2 (diff)
Merge pull request #115 from Spartan322/fix/sound-and-music-player
Diffstat (limited to 'game/src/OptionMenu')
-rw-r--r--game/src/OptionMenu/SettingNodes/SettingHSlider.gd5
1 files changed, 4 insertions, 1 deletions
diff --git a/game/src/OptionMenu/SettingNodes/SettingHSlider.gd b/game/src/OptionMenu/SettingNodes/SettingHSlider.gd
index 4e7c9c9..6fa30ed 100644
--- a/game/src/OptionMenu/SettingNodes/SettingHSlider.gd
+++ b/game/src/OptionMenu/SettingNodes/SettingHSlider.gd
@@ -20,12 +20,15 @@ func load_setting(file : ConfigFile):
var load_value = file.get_value(section_name, setting_name, default_value)
match typeof(load_value):
TYPE_FLOAT, TYPE_INT:
+ if value == load_value: value_changed.emit(value)
value = load_value
return
TYPE_STRING, TYPE_STRING_NAME:
var load_string := load_value as String
if load_string.is_valid_float():
- value = load_string.to_float()
+ load_value = load_string.to_float()
+ if value == load_value: value_changed.emit(value)
+ value = load_value
return
push_error("Setting value '%s' invalid for setting [%s] \"%s\"" % [load_value, section_name, setting_name])
value = default_value