extends CanvasLayer signal new_game_pressed # Called when the node enters the scene tree for the first time. func _ready() -> void: #Connecting signals $TitleScreen/MenuContainer/NewGame.pressed.connect(_on_new_game_pressed) $TitleScreen/MenuContainer/Load.pressed.connect(_on_load_pressed) $TitleScreen/MenuContainer/Settings.pressed.connect(_on_settings_pressed) $TitleScreen/MenuContainer/QuitGame.pressed.connect(_on_quit_game_pressed) #Hiding everything self.hide() func _on_new_game_pressed() -> void: new_game_pressed.emit() func _on_load_pressed(): UI.get_node("UI/Load").show() UI.get_node("UI/Load/MarginContainer/VBoxContainer/Control/Back").hide() UI.get_node("UI/Load/MarginContainer/VBoxContainer/Control/BackTitle").show() UI.masks.mask.visible = true func _on_settings_pressed() -> void: UI.get_node("UI/Settings").show() UI.get_node("UI/Settings/MarginContainer/VBoxContainer/Control/Back").hide() UI.get_node("UI/Settings/MarginContainer/VBoxContainer/Control/BackTitle").show() UI.masks.mask.visible = true func _on_quit_game_pressed(): get_tree().quit()