extends Control var main_scene : PackedScene = preload("res://Scenes/main.tscn") @onready var help_panel : Panel = $HelpPanel @onready var tool_panel : Panel = $ToolPanel @onready var credits_panel : Panel = $CreditsPanel func _ready() -> void: if OS.has_feature("web"): $Buttons/Quit.visible = false $Buttons/SourceCode.text = "Source Code (Opens in another tab)" func _unhandled_input(event: InputEvent) -> void: if event is InputEventKey: if event.is_action_pressed("ui_accept"): start_game() if event.is_action_pressed("ui_cancel") and !OS.has_feature("web"): quit() func start_game() -> void: get_tree().change_scene_to_packed(main_scene) func quit() -> void: get_tree().quit(0) func show_help() -> void: help_panel.visible = true func hide_help() -> void: help_panel.visible = false func show_tools() -> void: tool_panel.visible = true func hide_tools() -> void: tool_panel.visible = false func show_credits() -> void: credits_panel.visible = true func hide_credits() -> void: credits_panel.visible = false func show_source_code() -> void: OS.shell_open("https://git.techiedamien.xyz/TechieDamien/Ouroboros")