summaryrefslogtreecommitdiff
path: root/scripts/optionsmenu.gd
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/optionsmenu.gd')
-rw-r--r--scripts/optionsmenu.gd8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/optionsmenu.gd b/scripts/optionsmenu.gd
index 5ed17d8..5376e21 100644
--- a/scripts/optionsmenu.gd
+++ b/scripts/optionsmenu.gd
@@ -12,9 +12,9 @@ onready var SFXSlider = $Control/VBoxContainer/GridContainer/VolumeSFXContainer/
func _ready():
# When scene is instanced, load the settings from singleton
- update_menu(global_variables.volume_master, MasterValue, MasterSlider)
- update_menu(global_variables.volume_music, MusicValue, MusicSlider)
- update_menu(global_variables.volume_sfx, SFXValue, SFXSlider)
+ refresh_menu(global_variables.volume_master, MasterValue, MasterSlider)
+ refresh_menu(global_variables.volume_music, MusicValue, MusicSlider)
+ refresh_menu(global_variables.volume_sfx, SFXValue, SFXSlider)
$Control/VBoxContainer/GridContainer/FullscreenCheckButton.set_pressed_no_signal(OS.window_fullscreen)
func _input(event):
@@ -49,7 +49,7 @@ func update_audio(value, bus, slider, enabled_var, volume_var, valuelabel):
AudioServer.set_bus_mute(bus, false)
global_variables.set(enabled_var, false)
-func update_menu(value, valuelabel, slider):
+func refresh_menu(value, valuelabel, slider):
# Converts stored range values back into a percentage value
var percentage = ((float(value) - min_vol) / (max_vol - min_vol) ) * 100
valuelabel.text = str(percentage) + "%"