summaryrefslogtreecommitdiff
path: root/UI/players_list_container.gd
diff options
context:
space:
mode:
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()