diary/user_interface/tool_bar/tool_bar.gd
mono 7d285bd607 - reworked Chat Panel system
- added user switching
- added Topic Panel functionality (features are missing)
- some basic refactoring
2022-05-14 20:51:48 +02:00

27 lines
678 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
func _on_CheckButton_toggled(_button_pressed):
Users.switch()