aboutsummaryrefslogtreecommitdiff
path: root/game/src/OptionMenu/VolumeGrid.gd
diff options
context:
space:
mode:
author Hop311 <hop3114@gmail.com>2023-03-04 19:06:05 +0100
committer Hop311 <hop3114@gmail.com>2023-03-04 19:06:05 +0100
commit3e088a2642d2d05eed011b2dd1bdee566225719f (patch)
tree4b80e3cbc20413f9b1ea57fed5a6f7a847328a29 /game/src/OptionMenu/VolumeGrid.gd
parent3a46095b678d75292090802280ce9dbd3f2d24dc (diff)
Comments marking implemeneted requirements
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)