extends Node2D

onready var startGameButton = $TitleScreen/StartButton
onready var quitGameButton = $TitleScreen/QuitButton
onready var titleScreen = $TitleScreen
onready var controls = $Controls

func _ready():
	startGameButton.grab_focus()

func _process(_delta):
	if startGameButton.is_hovered():
		startGameButton.grab_focus()
	elif quitGameButton.is_hovered():
		quitGameButton.grab_focus()

func _on_StartButton_pressed():
	get_tree().change_scene("res://Scene/GameMap.tscn")

func _on_QuitButton_pressed():
	get_tree().quit()

func _on_ControlsButton_pressed():
	titleScreen.visible = false
	controls.visible = true
