summaryrefslogtreecommitdiff
path: root/UI/players_list_container.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-11-26 17:13:40 +0100
committerDaniel Weipert <git@mail.dweipert.de>2024-11-26 17:13:40 +0100
commitcb9bb9d1c757b53707c741a3c8c218b513ffb5ec (patch)
tree1e3741a70672504d71685db98b22f7fe61e0e6cb /UI/players_list_container.gd
parent72863ffa31e27f4c6be862d80472cfb897fccaea (diff)
next commit
Diffstat (limited to 'UI/players_list_container.gd')
-rw-r--r--UI/players_list_container.gd24
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()