Added mute button and volume slider to text log
This commit is contained in:
parent
125e1e5edc
commit
c76c9f7268
5 changed files with 154 additions and 15 deletions
|
|
@ -56,17 +56,14 @@ func _process(delta):
|
|||
|
||||
func mute():
|
||||
MusicManager.set_volume(-80.0)
|
||||
#SoundManager.set_volume(-80.0)
|
||||
FileGlobals.set_global_data("muted", true)
|
||||
%MuteTextureRect.texture = load("res://images/ui/speaker-x-mark.svg")
|
||||
|
||||
func unmute():
|
||||
var volume = FileGlobals.get_global_data("volume", 0.0)
|
||||
MusicManager.set_volume(FileGlobals.get_global_data("volume", 0.0))
|
||||
#SoundManager.set_volume(0.0)
|
||||
#SoundManager.play("sfx_menu", "advance")
|
||||
SoundManager.play_varied("sfx_menu", "advance", 1.0, volume)
|
||||
FileGlobals.set_global_data("muted", false)
|
||||
SoundManager.play_varied("sfx_menu", "advance", 1.0, volume)
|
||||
%MuteTextureRect.texture = load("res://images/ui/speaker-wave.svg")
|
||||
|
||||
func init_credits():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue