extends CanvasLayer


var paused = false

const death_messages = [
	"Maybe just try harder next time",
	"You're bad",
	"How did you even die?",
	"It happens..."	
]


func _input(_event):
	if Input.is_action_just_pressed("ui_accept") and $Control.visible:
		get_tree().paused = false
		paused = false
		$Control.visible = false
		get_tree().reload_current_scene()
			
		
func visibility(visible):
	$Control.visible = visible


func show_menu():
	$Control.visible = true
	get_tree().paused = true
	paused = true
	$"Control/VBox/Death Message".text = extstd.choose(death_messages)
