forked from team-sg/hero-mark-2
28 lines
702 B
GDScript
28 lines
702 B
GDScript
extends Node
|
|
|
|
onready var continue_button = $Panel/Continue
|
|
|
|
func _ready():
|
|
#Grey out continue if no save files
|
|
yield(get_tree(),"idle_frame")
|
|
var file = File.new()
|
|
if file.file_exists("user://file1.pr") or file.file_exists("user://file2.pr") or file.file_exists("user://file3.pr"):
|
|
$Panel/Continue.grab_focus()
|
|
else:
|
|
$Panel/Body/GreyedContinue.visible = true
|
|
continue_button.visible = false
|
|
$Panel/FileSelect.grab_focus()
|
|
|
|
Vector2( 0.83205, 0.5547 )
|
|
|
|
|
|
func _on_Continue_button_down():
|
|
pass # Replace with function body.
|
|
|
|
|
|
func _on_FileSelect_button_down():
|
|
SceneManager.current_scene = load("res://menus/file_select.tscn").instance()
|
|
|
|
|
|
func _on_Exit_button_down():
|
|
get_tree().quit()
|