extends Node2D

signal dismissed

func _ready() -> void:
	$CanvasLayer/VBoxContainer/NewGameBtn.grab_focus()

func _on_ExitToMainMenuBtn_pressed() -> void:
	$AnimationPlayer.play_backwards("fade")
	yield($AnimationPlayer, "animation_finished");
	var next_scene = load("res://src/Menu/MainMenu.tscn")
	AudioManager.play(AudioManager.Music.Intro, .2)
	get_tree().change_scene_to(next_scene)
	queue_free()


func _on_NewGameBtn_pressed() -> void:
	$AnimationPlayer.play_backwards("fade")
	yield($AnimationPlayer, "animation_finished");
	emit_signal("dismissed")
	get_tree().reload_current_scene()
	pass # Replace with function body.
