aboutsummaryrefslogtreecommitdiff
path: root/game/src/OptionMenu/VolumeGrid.gd
diff options
context:
space:
mode:
author ClarkeCode <33846391+ClarkeCode@users.noreply.github.com>2023-03-04 19:46:42 +0100
committer GitHub <noreply@github.com>2023-03-04 19:46:42 +0100
commit028247a24866726b79c56cb2f266738a8a9abc70 (patch)
tree0807714d81b61002b4613dfa0c10aa7b1209eac6 /game/src/OptionMenu/VolumeGrid.gd
parent2f4842769b0856bc08a256907b64046fb55381ac (diff)
parent3e088a2642d2d05eed011b2dd1bdee566225719f (diff)
Merge pull request #55 from Hop311/req-comments
Comments marking implemented 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)