aboutsummaryrefslogtreecommitdiff
path: root/client/global.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/global.gd')
-rw-r--r--client/global.gd8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/global.gd b/client/global.gd
index ab4c8d6a..53049823 100644
--- a/client/global.gd
+++ b/client/global.gd
@@ -41,6 +41,7 @@ var using_joypad := false
var default_settings := {
"language": DropdownSetting.new(tr("Language"), 0, languages),
+ "master_volume": RangeSetting.new(tr("Volume"), 0, -30, 0),
"fullscreen": DropdownSetting.new(tr("Fullscreen"), 0, [tr("Keep"), tr("Always"), tr("Never")]),
"touch_controls": ToggleSetting.new(tr("Enable touch screen controls"), DisplayServer.is_touchscreen_available()),
"interpolate_camera_rotation": ToggleSetting.new(tr("Interpolate the camera rotation"), true),
@@ -135,8 +136,6 @@ func apply_settings():
# Temporal Anti-aliasing
get_viewport().use_taa = get_setting("taa")
- emit_signal("settings_changed")
-
# UI scale
match get_setting("ui_scale"):
0:
@@ -149,6 +148,11 @@ func apply_settings():
for k in profile["hints"].keys():
set_hint(k, false)
+ # Sets Volume
+ Sound.set_volume(get_setting("master_volume"))
+
+ emit_signal("settings_changed")
+
func update_language():
var lang_idx: int = get_setting("language")
var lang = languages[lang_idx]