diff options
Diffstat (limited to 'client/menu/setup.gd')
-rw-r--r-- | client/menu/setup.gd | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/client/menu/setup.gd b/client/menu/setup.gd index 21fbc526..f38f0bf7 100644 --- a/client/menu/setup.gd +++ b/client/menu/setup.gd @@ -19,7 +19,7 @@ extends Menu const SCROLL_SPEED := 500. -var character := -1 +var character_style = null # : Dictionary? @onready var anim: AnimationPlayer = $AnimationPlayer @onready var username: LineEdit = $ScrollContainer/Control/TextureRect/PaperMargin/Contents/NameEntry/LineEdit @@ -48,8 +48,8 @@ func _ready(): super() -func _character_selected(idx: int): - character = idx +func _character_selected(style: Dictionary): + character_style = style func _process(delta): var s = Input.get_axis("rotate_up", "rotate_down") @@ -58,7 +58,7 @@ func _process(delta): func check(): if username.text == "": return tr("c.error.empty_username") - if character == -1: return tr("c.error.select_hairstyle") + if character_style == null: return tr("c.error.select_hairstyle") return null func _on_sign_pressed(): @@ -79,6 +79,7 @@ func _on_sign_pressed(): await anim.animation_finished Global.set_profile("username", username.text) + Global.set_profile("character_style", character_style) if skip_tutorial.button_pressed: for k in Global.profile["hints"].keys(): Global.set_hint(k, true) |