diff options
author | tpart <tpart120@proton.me> | 2024-07-07 18:52:49 +0200 |
---|---|---|
committer | tpart <tpart120@proton.me> | 2024-07-07 18:52:54 +0200 |
commit | 44499c6e81dc5cc014f502cf6cb4db0c96081d7e (patch) | |
tree | 7cf07ee27ba517d7d4766677cc367bd1f9a16fbd /client/menu/lobby | |
parent | a72f4466c568dd7d7fe6f76a295fdd1162c1d312 (diff) | |
download | hurrycurry-44499c6e81dc5cc014f502cf6cb4db0c96081d7e.tar hurrycurry-44499c6e81dc5cc014f502cf6cb4db0c96081d7e.tar.bz2 hurrycurry-44499c6e81dc5cc014f502cf6cb4db0c96081d7e.tar.zst |
Add lobby menu
Diffstat (limited to 'client/menu/lobby')
-rw-r--r-- | client/menu/lobby/player.gd | 22 | ||||
-rw-r--r-- | client/menu/lobby/player.tscn | 43 |
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 |