extends Control

@onready var leaderboard_button = $Buttons/Leaderboard
@onready var quit_button = $Buttons/Quit

@onready var settings_menu: PackedScene = load("res://screens/settings_menu.tscn")
@onready var game: PackedScene = load("res://screens/game.tscn")

const DESKTOP_PLATFORMS = ["Windows", "macOS", "Linux"]

func _ready() -> void:
	leaderboard_button.disabled = not Leaderboard.exists()
	if OS.get_name() not in DESKTOP_PLATFORMS:
		quit_button.visible = false

func _on_new_game_pressed() -> void:
	get_tree().change_scene_to_packed(game)

func _on_quit_pressed() -> void:
	get_tree().quit()

func _on_settings_pressed() -> void:
	get_tree().change_scene_to_packed(settings_menu)
