extends Control

export(String, FILE) onready var bus_resource_path = "res://src/Sounds/default_bus_layout.tres"


func _ready() -> void:
	if visible:
		$"%MasterSlider".grab_focus()
		
func save() ->void:
	var new_resource = AudioServer.generate_bus_layout()
	ResourceSaver.save(bus_resource_path, new_resource)
	
func _input(event: InputEvent) -> void:
	if visible && event.is_action("ui_cancel"):
		$Panel/Back.emit_signal("button_up")
		
