23 lines
613 B
GDScript
23 lines
613 B
GDScript
extends PanelContainer
|
|
|
|
|
|
onready var profile_image_rect = get_node("Margin/Structure/Profile/ProfileImageRect")
|
|
onready var username = get_node("Margin/Structure/Profile/UserTexts/Username")
|
|
|
|
|
|
func _ready():
|
|
# warning-ignore:return_value_discarded
|
|
Users.connect("switched", self, "_on_user_switched")
|
|
|
|
|
|
func _input(event):
|
|
if event is InputEventKey:
|
|
if event.scancode == KEY_T and event.control and event.alt:
|
|
if event.pressed and !event.is_echo():
|
|
Users.switch()
|
|
|
|
|
|
func _on_user_switched():
|
|
profile_image_rect.texture = Users.get_current().profile_image
|
|
username.text = Users.get_current().username
|