extends Node2D var map_width = 1280 var map_height = 720 var menu_id = 0 @onready var b1 = $Control/MenuButton1 @onready var b2 = $Control/MenuButton2 @onready var b3 = $Control/MenuButton3 @onready var b4 = $Control/MenuButton4 @onready var b5 = $Control/MenuButton5 @onready var profile_status = $Control/ProfileStatus @onready var input = $Control/Input func _ready(): change_menu(0) profile_status.text = "Current profile: [{profile}]".format({"profile": Game.profile.profile_meta['meta']['profile_name']}) func change_menu(id): input.visible = false match id: 0: # Main b1.id = "NewGame" b2.id = "Profiles" b3.id = "Settings" b4.id = "Credits" b5.id = "ExitGame" 1: # Profiles b1.id = "CreateProfile" b2.id = "LoadProfile" b3.id = "Back" b4.id = "Null" b5.id = "Null" 2: # Create Profile b1.id = "Null" b2.id = "CreateProfileConfirm" b3.id = "Back" b4.id = "Null" b5.id = "Null" input.visible = true input.text = "" 3: # Load Profile b1.id = "Null" b2.id = "LoadProfileConfirm" b3.id = "Back" b4.id = "Null" b5.id = "Null" input.visible = true input.text = "" b1.change_name() b2.change_name() b3.change_name() b4.change_name() b5.change_name() menu_id = id