forked from team-sg/hero-mark-2
file select and file creation, menus glued together
This commit is contained in:
parent
13708b4046
commit
f7496c5e6f
18 changed files with 754 additions and 47 deletions
|
@ -3,10 +3,11 @@ extends Node
|
|||
onready var continue_button = $Panel/Continue
|
||||
|
||||
func _ready():
|
||||
Fade.fade_in(0.4)
|
||||
#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"):
|
||||
print(Save.current_file)
|
||||
if Save.current_file:
|
||||
$Panel/Continue.grab_focus()
|
||||
else:
|
||||
$Panel/Body/GreyedContinue.visible = true
|
||||
|
@ -17,12 +18,18 @@ func _ready():
|
|||
|
||||
|
||||
func _on_Continue_button_down():
|
||||
pass # Replace with function body.
|
||||
Fade.fade_out(0.4)
|
||||
yield(Fade, "fade_finished")
|
||||
SceneManager.current_scene = load("res://menus/level_select_scholar.tscn").instance()
|
||||
|
||||
|
||||
func _on_FileSelect_button_down():
|
||||
Fade.fade_out(0.4)
|
||||
yield(Fade, "fade_finished")
|
||||
SceneManager.current_scene = load("res://menus/file_select.tscn").instance()
|
||||
|
||||
|
||||
func _on_Exit_button_down():
|
||||
Fade.fade_out(0.4)
|
||||
yield(Fade, "fade_finished")
|
||||
get_tree().quit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue