Profile creating/loading in menu adjustments

This commit is contained in:
gotfishmakesticks 2023-11-13 08:57:14 +03:00
commit ff19560f0b
4 changed files with 36 additions and 4 deletions

View file

@ -16,7 +16,9 @@ func _ready():
if profile_meta != {} and profile_meta['meta'].has('last_profile'):
profile_meta = Game.profile_load(profile_meta['meta']['last_profile'])
Game.profile = Profile.create(profile_meta)
change_menu(0)
change_menu(0)
else:
change_menu(5)
profile_status.text = "Current profile: [{profile}]".format({"profile": Game.profile.profile_meta['meta']['profile_name']})
func change_menu(id):
@ -42,6 +44,7 @@ func change_menu(id):
b5.id = "Null"
input.visible = true
input.text = ""
input.placeholder_text = "Enter your profile name here!"
3: # Load Profile
b1.id = "Null"
b2.id = "LoadProfileConfirm"
@ -50,12 +53,21 @@ func change_menu(id):
b5.id = "Null"
input.visible = true
input.text = ""
input.placeholder_text = "Enter your profile name here!"
4: # Play Menu
b1.id = "LoadGame"
b2.id = "NewGame"
b3.id = "Back"
b4.id = "Null"
b5.id = "Null"
5: # First-timer Create Profile
b1.id = "Null"
b2.id = "FirstCreateProfileConfirm"
b3.id = "Null"
b4.id = "Null"
b5.id = "Null"
input.visible = true
input.text = ""
b1.change_name()
b2.change_name()
b3.change_name()