diff options
author | metamuffin <metamuffin@disroot.org> | 2024-06-26 16:53:14 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-06-26 16:53:14 +0200 |
commit | 1e88790bf75baefc48e2950529f0b6e930534830 (patch) | |
tree | d1acf176d8031947718e8bb00946af74967604f4 /client/menu/character_menu.gd | |
parent | 2ca6ac7ab329036d0155de2de4b0a11f3a785414 (diff) | |
parent | 89310ea939d495274302d207be34cceae618768c (diff) | |
download | hurrycurry-1e88790bf75baefc48e2950529f0b6e930534830.tar hurrycurry-1e88790bf75baefc48e2950529f0b6e930534830.tar.bz2 hurrycurry-1e88790bf75baefc48e2950529f0b6e930534830.tar.zst |
Merge branch 'master' of https://codeberg.org/metamuffin/undercooked
Diffstat (limited to 'client/menu/character_menu.gd')
-rw-r--r-- | client/menu/character_menu.gd | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/client/menu/character_menu.gd b/client/menu/character_menu.gd index f4b878be..3e535e71 100644 --- a/client/menu/character_menu.gd +++ b/client/menu/character_menu.gd @@ -19,21 +19,22 @@ extends Control @onready var num_hairstyles := character.hairstyles.keys().size() func _ready(): - $VBoxContainer/top_panel/a/username.text = Global.settings["username"] - character.select_hairstyle(Global.settings["character"]) + $VBoxContainer/top_panel/a/username.text = Global.profile["username"] + character.select_hairstyle(Global.profile["character"]) + Global.focus_first_button(self) func _on_back_pressed(): - $SceneTransition.transition_to("res://menu/main_menu.tscn") + $SceneTransition.transition_to("res://menu/menu_manager.tscn") func _on_username_text_changed(new_text): - Global.settings["username"] = new_text + Global.profile["username"] = new_text func _on_character_back_pressed(): - Global.settings["character"] = (Global.settings["character"] - 1) % num_hairstyles - character.select_hairstyle(Global.settings["character"]) + Global.profile["character"] = (Global.profile["character"] - 1) % num_hairstyles + character.select_hairstyle(Global.profile["character"]) Global.save_profile() func _on_character_forward_pressed(): - Global.settings["character"] = (Global.settings["character"] + 1) % num_hairstyles - character.select_hairstyle(Global.settings["character"]) + Global.profile["character"] = (Global.profile["character"] + 1) % num_hairstyles + character.select_hairstyle(Global.profile["character"]) Global.save_profile() |