aboutsummaryrefslogtreecommitdiff
path: root/game/src/OptionMenu/VolumeGrid.gd
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-03-30 15:04:58 +0200
committer GitHub <noreply@github.com>2023-03-30 15:04:58 +0200
commit3384b21177a160f7192a2e4877eea3b29880bf4e (patch)
treedb9c9a37a187e15ef494a700f8afe5d65c3a8b78 /game/src/OptionMenu/VolumeGrid.gd
parent8f213935bdea2400b6809f9d5db45dde3416dedc (diff)
Added Localisation (#77)
* Added Localisation * Removed `.gdignore`s. * Localisation dir path and Locale name cleanup * Incomplete entry warnings + README
Diffstat (limited to 'game/src/OptionMenu/VolumeGrid.gd')
-rw-r--r--game/src/OptionMenu/VolumeGrid.gd9
1 files changed, 6 insertions, 3 deletions
diff --git a/game/src/OptionMenu/VolumeGrid.gd b/game/src/OptionMenu/VolumeGrid.gd
index 5b1d13f..46613b4 100644
--- a/game/src/OptionMenu/VolumeGrid.gd
+++ b/game/src/OptionMenu/VolumeGrid.gd
@@ -14,13 +14,16 @@ func get_volume_value_as_db(value : float) -> float:
# linear_to_db consumes a float between 0 and 1 to produce the db value
return linear_to_db(value / RATIO_FOR_LINEAR)
-func add_volume_row(bus_name : StringName, bus_index : int) -> HSlider:
+func add_volume_row(bus_name : String, bus_index : int) -> HSlider:
var volume_label := Label.new()
- volume_label.text = bus_name + " Volume"
+ if bus_name == "Master":
+ volume_label.text = "MASTER_BUS"
+ else:
+ volume_label.text = bus_name
add_child(volume_label)
var volume_slider := SettingHSlider.new()
- volume_slider.section_name = "Audio"
+ volume_slider.section_name = "audio"
volume_slider.setting_name = volume_label.text
volume_slider.custom_minimum_size = Vector2(290, 0)
volume_slider.size_flags_vertical = Control.SIZE_FILL