aboutsummaryrefslogtreecommitdiff
path: root/client/menu/lobby
diff options
context:
space:
mode:
Diffstat (limited to 'client/menu/lobby')
-rw-r--r--client/menu/lobby/player.gd22
-rw-r--r--client/menu/lobby/player.tscn43
2 files changed, 65 insertions, 0 deletions
diff --git a/client/menu/lobby/player.gd b/client/menu/lobby/player.gd
new file mode 100644
index 00000000..c5c05eb4
--- /dev/null
+++ b/client/menu/lobby/player.gd
@@ -0,0 +1,22 @@
+# Undercooked - a game about cooking
+# Copyright 2024 tpart
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, version 3 of the License only.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+extends PanelContainer
+class_name PlayerTag
+
+@onready var name_label = $MarginContainer/HBoxContainer/Label
+
+func setup(player_name: String):
+ name_label.text = player_name
diff --git a/client/menu/lobby/player.tscn b/client/menu/lobby/player.tscn
new file mode 100644
index 00000000..964bc4fb
--- /dev/null
+++ b/client/menu/lobby/player.tscn
@@ -0,0 +1,43 @@
+[gd_scene load_steps=6 format=3 uid="uid://gmldnel4xbxy"]
+
+[ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://menu/theme/theme.tres" id="1_flfqn"]
+[ext_resource type="Texture2D" uid="uid://222w1wha75od" path="res://menu/user.webp" id="2_mnaqt"]
+[ext_resource type="Script" path="res://menu/lobby/player.gd" id="2_w3lyk"]
+
+[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1227j"]
+bg_color = Color(0, 0, 0, 1)
+corner_radius_top_left = 16
+corner_radius_top_right = 16
+corner_radius_bottom_right = 16
+corner_radius_bottom_left = 16
+
+[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_3yp6e"]
+content_margin_right = 8.0
+
+[node name="Player" type="PanelContainer"]
+offset_right = 40.0
+offset_bottom = 40.0
+theme = ExtResource("1_flfqn")
+theme_override_styles/panel = SubResource("StyleBoxFlat_1227j")
+script = ExtResource("2_w3lyk")
+
+[node name="MarginContainer" type="MarginContainer" parent="."]
+layout_mode = 2
+theme_override_constants/margin_left = 4
+theme_override_constants/margin_top = 4
+theme_override_constants/margin_right = 4
+theme_override_constants/margin_bottom = 4
+
+[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
+layout_mode = 2
+
+[node name="Icon" type="TextureRect" parent="MarginContainer/HBoxContainer"]
+layout_mode = 2
+texture = ExtResource("2_mnaqt")
+expand_mode = 2
+
+[node name="Label" type="Label" parent="MarginContainer/HBoxContainer"]
+layout_mode = 2
+theme_override_styles/normal = SubResource("StyleBoxEmpty_3yp6e")
+text = "Player"
+vertical_alignment = 1