diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-11-26 17:13:40 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-11-26 17:13:40 +0100 |
commit | cb9bb9d1c757b53707c741a3c8c218b513ffb5ec (patch) | |
tree | 1e3741a70672504d71685db98b22f7fe61e0e6cb /UI/players_list_container.gd | |
parent | 72863ffa31e27f4c6be862d80472cfb897fccaea (diff) |
next commit
Diffstat (limited to 'UI/players_list_container.gd')
-rw-r--r-- | UI/players_list_container.gd | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/UI/players_list_container.gd b/UI/players_list_container.gd new file mode 100644 index 0000000..238a703 --- /dev/null +++ b/UI/players_list_container.gd @@ -0,0 +1,24 @@ +extends VBoxContainer + + +signal clicked + +@export var label: String: + set(value): + label = value + $Label.text = value + $Label.visible = !!value + +@onready var list := %PlayersList + + +func _ready(): + $Label.visible = !!label + + list.remove_child(list.get_child(0)) + list.remove_child(list.get_child(0)) + + +func _on_label_gui_input(event: InputEvent) -> void: + if event.is_action("select"): + clicked.emit() |