extends Control

class_name SettingsMenu

@onready var audio_options_container: VBoxContainer = $%AudioOptionsContainer

func _ready() -> void:
	_refresh_audio_options()

func _get_audio_options() -> Array[AudioOption]:
	var audio_options: Array[AudioOption] = []

	for child in audio_options_container.get_children():
		if child is AudioOption:
			audio_options.append(child)

	return audio_options

func _refresh_audio_options() -> void:
	for audio_option in _get_audio_options():
		audio_option.refresh()

func _apply_current_audio_values() -> void:
	for audio_option in _get_audio_options():
		audio_option.apply_current_value()
