aboutsummaryrefslogtreecommitdiff
path: root/game/src/OptionMenu/VolumeGrid.gd
diff options
context:
space:
mode:
Diffstat (limited to 'game/src/OptionMenu/VolumeGrid.gd')
-rw-r--r--game/src/OptionMenu/VolumeGrid.gd7
1 files changed, 6 insertions, 1 deletions
diff --git a/game/src/OptionMenu/VolumeGrid.gd b/game/src/OptionMenu/VolumeGrid.gd
index 8d5a016..297de6f 100644
--- a/game/src/OptionMenu/VolumeGrid.gd
+++ b/game/src/OptionMenu/VolumeGrid.gd
@@ -31,10 +31,14 @@ func add_volume_row(bus_name : StringName, bus_index : int) -> HSlider:
_slider_dictionary[volume_label.text] = volume_slider
return volume_slider
+# REQUIREMENTS
+# * UI-22
func _ready():
for bus_index in AudioServer.bus_count:
add_volume_row(AudioServer.get_bus_name(bus_index), bus_index)
+# REQUIREMENTS
+# * UIFUN-30
func _on_slider_value_changed(value : float, bus_index : int) -> void:
AudioServer.set_bus_volume_db(bus_index, get_volume_value_as_db(value))
@@ -43,7 +47,8 @@ func _on_options_menu_load_settings(load_file : ConfigFile):
for volume_slider in _slider_dictionary.values():
volume_slider.load_setting(load_file)
-
+# REQUIREMENTS
+# * UIFUN-23
func _on_options_menu_save_settings(save_file : ConfigFile):
for volume_slider in _slider_dictionary.values():
volume_slider.save_setting(save_file)