extends Control

export var normal_label_color = Color()
export var hover_label_color = Color()

func _ready():
	$fader/anim.play("fade_out")
	yield(get_tree().create_timer(0.4), "timeout")
	$music.play()
	yield(get_tree().create_timer(19),"timeout")
	$fader/anim.play("fade_in")
	yield($fader/anim, "animation_finished")
	get_tree().change_scene("res://scenes/title_screen.tscn")

func _on_title_button_pressed():
	$fader/anim.play("fade_in")
	yield($fader/anim, "animation_finished")
	get_tree().change_scene("res://scenes/title_screen.tscn")

func _on_title_button_mouse_entered():
	$title.modulate = hover_label_color
	$menu_sound.play()

func _on_title_button_mouse_exited():
	$title.modulate = normal_label_color
