extends Control ## Title screen! # TODO is there a way to get this path without loading the level scene? @export var save_path: String @export_category("Game Scenes") # TODO is there a way to get the appropriate level scene path here without loading the world scene? @export_file("*.tscn") var level_scene: String @export_file("*.tscn") var world_scene: String @export var settings_scene: PackedScene @onready var continue_button: Button = %Continue @onready var settings_container: Control = %SettingsContainer func _ready() -> void: Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) if FileAccess.file_exists(save_path): continue_button.disabled = false func continue_game() -> void: LoadingTools.load_save(save_path) func new_game() -> void: LoadingTools.load_level(level_scene) func show_settings() -> void: var instance: Control = settings_scene.instantiate() settings_container.add_child(instance) func quit() -> void: get_tree().root.propagate_notification(NOTIFICATION_WM_CLOSE_REQUEST)