class_name MainMenu extends Node onready var continue_button = $Panel/Continue func _ready(): Game.marathon_mode = false Fade.fade_in(Options.transition_speed_secs) #Grey out continue if no save files yield(get_tree(),"idle_frame") if Save.current_file and not Save.current_file.debug: $Panel/Continue.grab_focus() else: $Panel/Body/GreyedContinue.visible = true continue_button.visible = false $Panel/FileSelect.grab_focus() if Game.last_mm_button != null: get_node(Game.last_mm_button).grab_focus() Vector2( 0.83205, 0.5547 ) func _on_Continue_button_down(): Game.last_mm_button = "Panel/Continue" Fade.fade_out(Options.transition_speed_secs) yield(Fade, "fade_finished") SceneManager.current_scene = load("res://menus/level_select_scholar.tscn").instance() func _on_FileSelect_button_down(): Game.last_mm_button = @"Panel/FileSelect" Fade.fade_out(Options.transition_speed_secs) yield(Fade, "fade_finished") SceneManager.current_scene = load("res://menus/file_select.tscn").instance() func _on_Exit_button_down(): Game.last_mm_button = @"Panel/FileSelect" Fade.fade_out(Options.transition_speed_secs) yield(Fade, "fade_finished") get_tree().quit() func _on_SoundTest_button_down(): Game.last_mm_button = @"Panel/SoundTest" Fade.fade_out(Options.transition_speed_secs) yield(Fade, "fade_finished") SceneManager.current_scene = load("res://menus/sound_test.tscn").instance() func _on_HighScores_button_down() -> void: Game.last_mm_button = @"Panel/HighScores" Fade.fade_out(Options.transition_speed_secs) yield(Fade, "fade_finished") SceneManager.current_scene = load("res://menus/scoreboards.tscn").instance() func _on_Options_button_down() -> void: Game.last_mm_button = @"Panel/Options" Fade.fade_out(Options.transition_speed_secs) yield(Fade, "fade_finished") SceneManager.current_scene = load("res://menus/options_menu.tscn").instance() func _on_MarathonMode_button_down() -> void: Game.last_mm_button = @"Panel/MarathonMode" Fade.fade_out(Options.transition_speed_secs) yield(Fade, "fade_finished") SceneManager.current_scene = load("res://menus/marathon_start.tscn").instance()