extends ColorRect

var paused = false setget set_paused

func set_paused(value):
	paused = value
	get_tree().paused = paused
	visible = paused
	if value:
		SoundFx.play_fx("Pause")
	else:
		SoundFx.play_fx("Unpause", 1, -30)

func _on_ResumeButton_pressed():
	self.paused = false

func _on_QuitButton_pressed():
	SoundFx.play_fx("Click")
	get_tree().quit()

func _process(_delta):
	if Input.is_action_just_pressed("pause"):
		self.paused = !paused
