aboutsummaryrefslogtreecommitdiff
path: root/client/menu/character_menu.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/menu/character_menu.gd')
-rw-r--r--client/menu/character_menu.gd10
1 files changed, 10 insertions, 0 deletions
diff --git a/client/menu/character_menu.gd b/client/menu/character_menu.gd
index 3949b5c0..836dc7c3 100644
--- a/client/menu/character_menu.gd
+++ b/client/menu/character_menu.gd
@@ -15,5 +15,15 @@
#
extends Control
+func _ready():
+ $top_panel/a/username.text = Global.username
+
+func _notification(what):
+ if what == NOTIFICATION_PREDELETE:
+ Global.save_profile()
+
func _on_back_pressed():
$SceneTransition.transition_to("res://menu/main_menu.tscn")
+
+func _on_username_text_changed(new_text):
+ Global.username = new_text