extends HSlider
#var scaling_factor = Vector2(1.0, 1.0) # You can add this as a Global variable or in a singleton script
#
func _ready():
#	SaveManager.load_data()
#
# Update the scaling factor
#func update_scaling(new_scale: Vector2):
#	$Control.scale = new_scale
	pass

func _on_HSlider_value_changed(value):
	var GameVolume = value
	AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), value)
	#SaveManager.data.name = GameVolume
	#SaveManager.save_data()
	var player = AudioStreamPlayer.new()
	self.add_child(player)
	player.stream = load("res://assets/sounds/click.wav")
	player.play()
	pass # Replace with function body.


func _on_Button_pressed():
	AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), -100)


func _on_MuteButton_pressed():
	AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), -100)


func _on_MuteButton_toggled(button_pressed):
	pass


func _on_MuteButton_button_up():
	pass


func _on_MuteButton_button_down():
	pass
