aboutsummaryrefslogtreecommitdiff
path: root/client/gui/overlays
diff options
context:
space:
mode:
Diffstat (limited to 'client/gui/overlays')
-rw-r--r--client/gui/overlays/announce_title.gd2
-rw-r--r--client/gui/overlays/announce_title.tscn20
-rw-r--r--client/gui/overlays/chat.gd2
-rw-r--r--client/gui/overlays/chat.tscn18
-rw-r--r--client/gui/overlays/controls_visualization/controller/controller_explanation.gd2
-rw-r--r--client/gui/overlays/controls_visualization/controller/controller_explanation.tscn34
-rw-r--r--client/gui/overlays/controls_visualization/device_explanation.gd2
-rw-r--r--client/gui/overlays/controls_visualization/explanation.gd6
-rw-r--r--client/gui/overlays/controls_visualization/explanation.tscn24
-rw-r--r--client/gui/overlays/controls_visualization/keyboard/keyboard_button.tscn4
-rw-r--r--client/gui/overlays/controls_visualization/keyboard/keyboard_explanation.gd2
-rw-r--r--client/gui/overlays/controls_visualization/keyboard/keyboard_explanation.tscn66
-rw-r--r--client/gui/overlays/debug/debug.gd4
-rw-r--r--client/gui/overlays/debug/debug.tscn9
-rw-r--r--client/gui/overlays/debug/debug_pie.gd2
-rw-r--r--client/gui/overlays/debug/pie.tscn2
-rw-r--r--client/gui/overlays/lobby/lobby.gd181
-rw-r--r--client/gui/overlays/lobby/lobby.gd.uid1
-rw-r--r--client/gui/overlays/lobby/lobby.tscn182
-rw-r--r--client/gui/overlays/lobby/player.gd2
-rw-r--r--client/gui/overlays/lobby/player.tscn18
-rw-r--r--client/gui/overlays/overlays.gd4
-rw-r--r--client/gui/overlays/overlays.tscn20
-rw-r--r--client/gui/overlays/pinned_messages.gd2
-rw-r--r--client/gui/overlays/pinned_messages.tscn6
-rw-r--r--client/gui/overlays/popup_message/font_variation.tres10
-rw-r--r--client/gui/overlays/popup_message/popup_message.gd31
-rw-r--r--client/gui/overlays/popup_message/popup_message.tscn20
-rw-r--r--client/gui/overlays/popup_message/server_message.gd66
-rw-r--r--client/gui/overlays/popup_message/server_message.tscn37
-rw-r--r--client/gui/overlays/score.gd2
-rw-r--r--client/gui/overlays/score.tscn62
32 files changed, 266 insertions, 577 deletions
diff --git a/client/gui/overlays/announce_title.gd b/client/gui/overlays/announce_title.gd
index 66d5434b..b9e7c542 100644
--- a/client/gui/overlays/announce_title.gd
+++ b/client/gui/overlays/announce_title.gd
@@ -1,5 +1,5 @@
# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
+# Copyright (C) 2026 Hurry Curry! Contributors
#
# 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
diff --git a/client/gui/overlays/announce_title.tscn b/client/gui/overlays/announce_title.tscn
index 79ec11e8..b2e4dcc6 100644
--- a/client/gui/overlays/announce_title.tscn
+++ b/client/gui/overlays/announce_title.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=10 format=3 uid="uid://c7pykhpdhgs64"]
+[gd_scene format=3 uid="uid://c7pykhpdhgs64"]
[ext_resource type="Script" uid="uid://ci08whhm2ej1m" path="res://gui/overlays/announce_title.gd" id="1_6bcyw"]
[ext_resource type="FontFile" uid="uid://bo4vh5xkpvrh1" path="res://gui/resources/fonts/font-sansita-swashed.woff2" id="2_037n2"]
@@ -320,13 +320,13 @@ _data = {
&"fade_out_quick": SubResource("Animation_deqe4")
}
-[node name="AnnounceTitle" type="Control"]
+[node name="AnnounceTitle" type="Control" unique_id=343666759]
visible = false
layout_mode = 3
anchors_preset = 0
script = ExtResource("1_6bcyw")
-[node name="Center" type="Control" parent="."]
+[node name="Center" type="Control" parent="." unique_id=1028083340]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
@@ -336,11 +336,11 @@ anchor_bottom = 0.5
grow_horizontal = 2
grow_vertical = 2
-[node name="Node2D" type="Node2D" parent="Center"]
+[node name="Node2D" type="Node2D" parent="Center" unique_id=2095678670]
modulate = Color(1, 1, 1, 0)
scale = Vector2(1e-05, 1e-05)
-[node name="Label" type="Label" parent="Center/Node2D"]
+[node name="Label" type="Label" parent="Center/Node2D" unique_id=267605128]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
@@ -361,14 +361,12 @@ text = "GO!"
horizontal_alignment = 1
vertical_alignment = 1
-[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
-libraries = {
-&"": SubResource("AnimationLibrary_deqe4")
-}
+[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=237178568]
+libraries/ = SubResource("AnimationLibrary_deqe4")
-[node name="PreperationTimer" type="Timer" parent="."]
+[node name="PreperationTimer" type="Timer" parent="." unique_id=806142906]
one_shot = true
-[node name="InitialDelay" type="Timer" parent="."]
+[node name="InitialDelay" type="Timer" parent="." unique_id=1150912956]
wait_time = 0.5
one_shot = true
diff --git a/client/gui/overlays/chat.gd b/client/gui/overlays/chat.gd
index 676337a6..a831cf2c 100644
--- a/client/gui/overlays/chat.gd
+++ b/client/gui/overlays/chat.gd
@@ -1,5 +1,5 @@
# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
+# Copyright (C) 2026 Hurry Curry! Contributors
#
# 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
diff --git a/client/gui/overlays/chat.tscn b/client/gui/overlays/chat.tscn
index 068d0ee4..b0bd9728 100644
--- a/client/gui/overlays/chat.tscn
+++ b/client/gui/overlays/chat.tscn
@@ -1,11 +1,10 @@
-[gd_scene load_steps=5 format=3 uid="uid://xcxbmynn8mhi"]
+[gd_scene format=3 uid="uid://xcxbmynn8mhi"]
-[ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://gui/resources/theme/theme.tres" id="1_lmy51"]
[ext_resource type="Script" uid="uid://bgt04y4ncl1fv" path="res://gui/overlays/chat.gd" id="2_3543w"]
[ext_resource type="Material" uid="uid://beea1pc5nt67r" path="res://gui/resources/materials/dark_blur_material.tres" id="3_15i2y"]
[ext_resource type="Script" uid="uid://cmncjc06kadpe" path="res://gui/components/blur_setup.gd" id="4_3rmhr"]
-[node name="ChatPreview" type="Control"]
+[node name="ChatPreview" type="Control" unique_id=1086008487]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
@@ -13,27 +12,26 @@ anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
-theme = ExtResource("1_lmy51")
script = ExtResource("2_3543w")
-[node name="MarginContainer" type="MarginContainer" parent="."]
-layout_mode = 2
+[node name="MarginContainer" type="MarginContainer" parent="." unique_id=468015652]
+layout_mode = 0
anchor_bottom = 1.0
offset_right = 296.0
grow_vertical = 2
-[node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer"]
+[node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer" unique_id=1928434577]
layout_mode = 2
horizontal_scroll_mode = 0
-[node name="PanelContainer" type="PanelContainer" parent="MarginContainer/ScrollContainer"]
+[node name="PanelContainer" type="PanelContainer" parent="MarginContainer/ScrollContainer" unique_id=547642679]
material = ExtResource("3_15i2y")
layout_mode = 2
size_flags_horizontal = 3
-size_flags_vertical = 0
+size_flags_vertical = 10
mouse_filter = 2
script = ExtResource("4_3rmhr")
-[node name="Messages" type="VBoxContainer" parent="MarginContainer/ScrollContainer/PanelContainer"]
+[node name="Messages" type="VBoxContainer" parent="MarginContainer/ScrollContainer/PanelContainer" unique_id=76448729]
layout_mode = 2
mouse_filter = 2
diff --git a/client/gui/overlays/controls_visualization/controller/controller_explanation.gd b/client/gui/overlays/controls_visualization/controller/controller_explanation.gd
index 84e93cfa..cb1a876e 100644
--- a/client/gui/overlays/controls_visualization/controller/controller_explanation.gd
+++ b/client/gui/overlays/controls_visualization/controller/controller_explanation.gd
@@ -1,5 +1,5 @@
# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
+# Copyright (C) 2026 Hurry Curry! Contributors
#
# 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
diff --git a/client/gui/overlays/controls_visualization/controller/controller_explanation.tscn b/client/gui/overlays/controls_visualization/controller/controller_explanation.tscn
index 410f2592..dbe17ee3 100644
--- a/client/gui/overlays/controls_visualization/controller/controller_explanation.tscn
+++ b/client/gui/overlays/controls_visualization/controller/controller_explanation.tscn
@@ -1,11 +1,11 @@
-[gd_scene load_steps=5 format=3 uid="uid://ceex0cpjrb81p"]
+[gd_scene format=3 uid="uid://ceex0cpjrb81p"]
[ext_resource type="Script" uid="uid://dsg537e6dc68" path="res://gui/overlays/controls_visualization/controller/controller_explanation.gd" id="1_n0s1n"]
[ext_resource type="FontVariation" uid="uid://cl6m4hqsnrpav" path="res://gui/resources/fonts/sansita-swashed-bold.tres" id="2_ewgm4"]
[ext_resource type="Texture2D" uid="uid://cf8hrxilqe2ih" path="res://gui/overlays/controls_visualization/arrow.svg" id="3_565r1"]
[ext_resource type="Texture2D" uid="uid://doo07i13vtb34" path="res://gui/overlays/controls_visualization/controller/controller.svg" id="5_nalwd"]
-[node name="ControllerExplanation" type="Control"]
+[node name="ControllerExplanation" type="Control" unique_id=225005545]
custom_minimum_size = Vector2(0, 450)
layout_mode = 3
anchors_preset = 15
@@ -16,7 +16,7 @@ grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_n0s1n")
-[node name="Control" type="Control" parent="."]
+[node name="Control" type="Control" parent="." unique_id=612138847]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
@@ -26,40 +26,40 @@ anchor_bottom = 0.5
grow_horizontal = 2
grow_vertical = 2
-[node name="Node2D" type="Node2D" parent="Control"]
+[node name="Node2D" type="Node2D" parent="Control" unique_id=1382260045]
position = Vector2(0, 50)
-[node name="Controller" type="Sprite2D" parent="Control/Node2D"]
+[node name="Controller" type="Sprite2D" parent="Control/Node2D" unique_id=443484705]
scale = Vector2(0.4, 0.4)
texture = ExtResource("5_nalwd")
-[node name="Arrow" type="Sprite2D" parent="Control/Node2D"]
+[node name="Arrow" type="Sprite2D" parent="Control/Node2D" unique_id=2024226522]
position = Vector2(-250, -150)
rotation = 1.5707964
scale = Vector2(0.5, 0.5)
texture = ExtResource("3_565r1")
-[node name="Arrow4" type="Sprite2D" parent="Control/Node2D"]
+[node name="Arrow4" type="Sprite2D" parent="Control/Node2D" unique_id=366803430]
position = Vector2(45, -150)
scale = Vector2(0.5, -0.5)
texture = ExtResource("3_565r1")
-[node name="Arrow2" type="Sprite2D" parent="Control/Node2D"]
+[node name="Arrow2" type="Sprite2D" parent="Control/Node2D" unique_id=2011085377]
position = Vector2(260, -140)
rotation = 1.5707963
scale = Vector2(0.5, -0.5)
texture = ExtResource("3_565r1")
-[node name="Arrow3" type="Sprite2D" parent="Control/Node2D"]
+[node name="Arrow3" type="Sprite2D" parent="Control/Node2D" unique_id=1350514919]
position = Vector2(215, 20)
rotation = -1.5707964
scale = Vector2(0.5, 0.5)
texture = ExtResource("3_565r1")
-[node name="Move" type="Node2D" parent="Control/Node2D"]
+[node name="Move" type="Node2D" parent="Control/Node2D" unique_id=1101261466]
position = Vector2(-330, -175)
-[node name="Label" type="Label" parent="Control/Node2D/Move"]
+[node name="Label" type="Label" parent="Control/Node2D/Move" unique_id=1806122210]
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
@@ -75,10 +75,10 @@ theme_override_font_sizes/font_size = 40
text = "c.controls_explanation.move"
horizontal_alignment = 2
-[node name="Boost" type="Node2D" parent="Control/Node2D"]
+[node name="Boost" type="Node2D" parent="Control/Node2D" unique_id=1174801668]
position = Vector2(335, -165)
-[node name="Label" type="Label" parent="Control/Node2D/Boost"]
+[node name="Label" type="Label" parent="Control/Node2D/Boost" unique_id=372533033]
anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
@@ -90,10 +90,10 @@ theme_override_fonts/font = ExtResource("2_ewgm4")
theme_override_font_sizes/font_size = 40
text = "c.controls_explanation.boost"
-[node name="InteractRight" type="Node2D" parent="Control/Node2D"]
+[node name="InteractRight" type="Node2D" parent="Control/Node2D" unique_id=629169846]
position = Vector2(290, 25)
-[node name="Label" type="Label" parent="Control/Node2D/InteractRight"]
+[node name="Label" type="Label" parent="Control/Node2D/InteractRight" unique_id=1237574916]
anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
@@ -105,10 +105,10 @@ theme_override_fonts/font = ExtResource("2_ewgm4")
theme_override_font_sizes/font_size = 40
text = "c.controls_explanation.interact_right"
-[node name="InteractLeft" type="Node2D" parent="Control/Node2D"]
+[node name="InteractLeft" type="Node2D" parent="Control/Node2D" unique_id=1696365379]
position = Vector2(20, -250)
-[node name="Label" type="Label" parent="Control/Node2D/InteractLeft"]
+[node name="Label" type="Label" parent="Control/Node2D/InteractLeft" unique_id=558541274]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
diff --git a/client/gui/overlays/controls_visualization/device_explanation.gd b/client/gui/overlays/controls_visualization/device_explanation.gd
index 7bfe2fb4..ae39c3b6 100644
--- a/client/gui/overlays/controls_visualization/device_explanation.gd
+++ b/client/gui/overlays/controls_visualization/device_explanation.gd
@@ -1,5 +1,5 @@
# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
+# Copyright (C) 2026 Hurry Curry! Contributors
#
# 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
diff --git a/client/gui/overlays/controls_visualization/explanation.gd b/client/gui/overlays/controls_visualization/explanation.gd
index 77147f1d..20d60dc5 100644
--- a/client/gui/overlays/controls_visualization/explanation.gd
+++ b/client/gui/overlays/controls_visualization/explanation.gd
@@ -1,5 +1,5 @@
# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
+# Copyright (C) 2026 Hurry Curry! Contributors
#
# 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
@@ -20,8 +20,6 @@ var profile_name: String
var using_joypad: bool
var two_handed: bool
-@onready var game: Game = $"../Game"
-
@onready var title: Label = $MarginContainer/PanelContainer/SmartMarginContainer/VBoxContainer/Title
@onready var keyboard_explanation: KeyboardExplanation = $MarginContainer/PanelContainer/SmartMarginContainer/VBoxContainer/KeyboardExplanation
@onready var controller_explanation: ControllerExplanation = $MarginContainer/PanelContainer/SmartMarginContainer/VBoxContainer/ControllerExplanation
@@ -39,6 +37,4 @@ func _ready():
super()
func _on_accept_pressed() -> void:
- Profile.write(profile_name, true)
- game.mp.send_ready()
exit()
diff --git a/client/gui/overlays/controls_visualization/explanation.tscn b/client/gui/overlays/controls_visualization/explanation.tscn
index e102fa85..87cfd024 100644
--- a/client/gui/overlays/controls_visualization/explanation.tscn
+++ b/client/gui/overlays/controls_visualization/explanation.tscn
@@ -1,6 +1,5 @@
-[gd_scene load_steps=8 format=3 uid="uid://c7g5gpiyofmu8"]
+[gd_scene format=3 uid="uid://c7g5gpiyofmu8"]
-[ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://gui/resources/theme/theme.tres" id="1_81hfk"]
[ext_resource type="Script" uid="uid://bs2xryd5vamjf" path="res://gui/overlays/controls_visualization/explanation.gd" id="2_lxysr"]
[ext_resource type="Script" uid="uid://byshs20og68tn" path="res://gui/components/smart_margin_container.gd" id="2_m528b"]
[ext_resource type="Material" uid="uid://beea1pc5nt67r" path="res://gui/resources/materials/dark_blur_material.tres" id="3_pomap"]
@@ -8,18 +7,17 @@
[ext_resource type="PackedScene" uid="uid://wwj1ow1f437s" path="res://gui/overlays/controls_visualization/keyboard/keyboard_explanation.tscn" id="5_v3ijr"]
[ext_resource type="PackedScene" uid="uid://ceex0cpjrb81p" path="res://gui/overlays/controls_visualization/controller/controller_explanation.tscn" id="7_yuxcv"]
-[node name="Explanation" type="Control"]
+[node name="Explanation" type="Control" unique_id=1844082160]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
-theme = ExtResource("1_81hfk")
script = ExtResource("2_lxysr")
support_anim = false
-[node name="MarginContainer" type="MarginContainer" parent="."]
+[node name="MarginContainer" type="MarginContainer" parent="." unique_id=1783444226]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@@ -29,38 +27,38 @@ grow_vertical = 2
script = ExtResource("2_m528b")
metadata/_custom_type_script = "uid://byshs20og68tn"
-[node name="PanelContainer" type="PanelContainer" parent="MarginContainer"]
+[node name="PanelContainer" type="PanelContainer" parent="MarginContainer" unique_id=1011034861]
material = ExtResource("3_pomap")
layout_mode = 2
script = ExtResource("4_v3ijr")
-[node name="SmartMarginContainer" type="MarginContainer" parent="MarginContainer/PanelContainer"]
+[node name="SmartMarginContainer" type="MarginContainer" parent="MarginContainer/PanelContainer" unique_id=412197848]
layout_mode = 2
script = ExtResource("2_m528b")
metadata/_custom_type_script = "uid://byshs20og68tn"
-[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/PanelContainer/SmartMarginContainer"]
+[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/PanelContainer/SmartMarginContainer" unique_id=801432498]
layout_mode = 2
-[node name="Title" type="Label" parent="MarginContainer/PanelContainer/SmartMarginContainer/VBoxContainer"]
+[node name="Title" type="Label" parent="MarginContainer/PanelContainer/SmartMarginContainer/VBoxContainer" unique_id=1143098368]
layout_mode = 2
theme_override_font_sizes/font_size = 36
text = "c.settings.input"
horizontal_alignment = 1
-[node name="KeyboardExplanation" parent="MarginContainer/PanelContainer/SmartMarginContainer/VBoxContainer" instance=ExtResource("5_v3ijr")]
+[node name="KeyboardExplanation" parent="MarginContainer/PanelContainer/SmartMarginContainer/VBoxContainer" unique_id=1601826141 instance=ExtResource("5_v3ijr")]
visible = false
layout_mode = 2
-[node name="ControllerExplanation" parent="MarginContainer/PanelContainer/SmartMarginContainer/VBoxContainer" instance=ExtResource("7_yuxcv")]
+[node name="ControllerExplanation" parent="MarginContainer/PanelContainer/SmartMarginContainer/VBoxContainer" unique_id=2048880330 instance=ExtResource("7_yuxcv")]
visible = false
layout_mode = 2
-[node name="Spacer" type="Control" parent="MarginContainer/PanelContainer/SmartMarginContainer/VBoxContainer"]
+[node name="Spacer" type="Control" parent="MarginContainer/PanelContainer/SmartMarginContainer/VBoxContainer" unique_id=846502741]
layout_mode = 2
size_flags_vertical = 3
-[node name="Accept" type="Button" parent="MarginContainer/PanelContainer/SmartMarginContainer/VBoxContainer"]
+[node name="Accept" type="Button" parent="MarginContainer/PanelContainer/SmartMarginContainer/VBoxContainer" unique_id=1036973256]
layout_mode = 2
size_flags_horizontal = 4
text = "c.menu.accept"
diff --git a/client/gui/overlays/controls_visualization/keyboard/keyboard_button.tscn b/client/gui/overlays/controls_visualization/keyboard/keyboard_button.tscn
index e4462464..09f1eb04 100644
--- a/client/gui/overlays/controls_visualization/keyboard/keyboard_button.tscn
+++ b/client/gui/overlays/controls_visualization/keyboard/keyboard_button.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=2 format=3 uid="uid://dj7tqrgpdja42"]
+[gd_scene format=3 uid="uid://dj7tqrgpdja42"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ilwpo"]
content_margin_left = 5.0
@@ -17,7 +17,7 @@ corner_radius_bottom_right = 15
corner_radius_bottom_left = 15
shadow_size = 3
-[node name="KeyboardButton" type="Button"]
+[node name="KeyboardButton" type="Button" unique_id=744392589]
custom_minimum_size = Vector2(75, 75)
offset_right = 8.0
offset_bottom = 8.0
diff --git a/client/gui/overlays/controls_visualization/keyboard/keyboard_explanation.gd b/client/gui/overlays/controls_visualization/keyboard/keyboard_explanation.gd
index 5d6dfb42..eb536556 100644
--- a/client/gui/overlays/controls_visualization/keyboard/keyboard_explanation.gd
+++ b/client/gui/overlays/controls_visualization/keyboard/keyboard_explanation.gd
@@ -1,5 +1,5 @@
# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
+# Copyright (C) 2026 Hurry Curry! Contributors
#
# 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
diff --git a/client/gui/overlays/controls_visualization/keyboard/keyboard_explanation.tscn b/client/gui/overlays/controls_visualization/keyboard/keyboard_explanation.tscn
index 54001686..3c68c8fe 100644
--- a/client/gui/overlays/controls_visualization/keyboard/keyboard_explanation.tscn
+++ b/client/gui/overlays/controls_visualization/keyboard/keyboard_explanation.tscn
@@ -1,11 +1,11 @@
-[gd_scene load_steps=5 format=3 uid="uid://wwj1ow1f437s"]
+[gd_scene format=3 uid="uid://wwj1ow1f437s"]
[ext_resource type="Script" uid="uid://dekpmw0i03eyi" path="res://gui/overlays/controls_visualization/keyboard/keyboard_explanation.gd" id="1_ubxjd"]
[ext_resource type="PackedScene" uid="uid://dj7tqrgpdja42" path="res://gui/overlays/controls_visualization/keyboard/keyboard_button.tscn" id="2_8nrgi"]
[ext_resource type="FontVariation" uid="uid://cl6m4hqsnrpav" path="res://gui/resources/fonts/sansita-swashed-bold.tres" id="3_nvtkh"]
[ext_resource type="Texture2D" uid="uid://cf8hrxilqe2ih" path="res://gui/overlays/controls_visualization/arrow.svg" id="4_mjakv"]
-[node name="KeyboardExplanation" type="Control"]
+[node name="KeyboardExplanation" type="Control" unique_id=651660867]
custom_minimum_size = Vector2(0, 450)
layout_mode = 3
anchors_preset = 15
@@ -15,7 +15,7 @@ grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_ubxjd")
-[node name="VBoxContainer" type="HBoxContainer" parent="."]
+[node name="VBoxContainer" type="HBoxContainer" parent="." unique_id=484836512]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@@ -23,17 +23,17 @@ anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
-[node name="Control" type="Control" parent="VBoxContainer"]
+[node name="Control" type="Control" parent="VBoxContainer" unique_id=1305117984]
custom_minimum_size = Vector2(400, 375)
layout_mode = 2
size_flags_vertical = 4
-[node name="WASD" type="Node2D" parent="VBoxContainer/Control"]
+[node name="WASD" type="Node2D" parent="VBoxContainer/Control" unique_id=1579800839]
-[node name="Node2D" type="Node2D" parent="VBoxContainer/Control/WASD"]
+[node name="Node2D" type="Node2D" parent="VBoxContainer/Control/WASD" unique_id=341970939]
position = Vector2(200, 100)
-[node name="KeyboardButton" parent="VBoxContainer/Control/WASD/Node2D" instance=ExtResource("2_8nrgi")]
+[node name="KeyboardButton" parent="VBoxContainer/Control/WASD/Node2D" unique_id=2048931801 instance=ExtResource("2_8nrgi")]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
@@ -47,10 +47,10 @@ grow_horizontal = 2
grow_vertical = 2
text = "W"
-[node name="Node2D2" type="Node2D" parent="VBoxContainer/Control/WASD"]
+[node name="Node2D2" type="Node2D" parent="VBoxContainer/Control/WASD" unique_id=799400559]
position = Vector2(200, 175)
-[node name="KeyboardButton" parent="VBoxContainer/Control/WASD/Node2D2" instance=ExtResource("2_8nrgi")]
+[node name="KeyboardButton" parent="VBoxContainer/Control/WASD/Node2D2" unique_id=33904465 instance=ExtResource("2_8nrgi")]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
@@ -64,10 +64,10 @@ grow_horizontal = 2
grow_vertical = 2
text = "S"
-[node name="Node2D3" type="Node2D" parent="VBoxContainer/Control/WASD"]
+[node name="Node2D3" type="Node2D" parent="VBoxContainer/Control/WASD" unique_id=217001624]
position = Vector2(125, 175)
-[node name="KeyboardButton" parent="VBoxContainer/Control/WASD/Node2D3" instance=ExtResource("2_8nrgi")]
+[node name="KeyboardButton" parent="VBoxContainer/Control/WASD/Node2D3" unique_id=98593509 instance=ExtResource("2_8nrgi")]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
@@ -80,10 +80,10 @@ offset_bottom = 24.5
grow_horizontal = 2
grow_vertical = 2
-[node name="Node2D4" type="Node2D" parent="VBoxContainer/Control/WASD"]
+[node name="Node2D4" type="Node2D" parent="VBoxContainer/Control/WASD" unique_id=1178217426]
position = Vector2(275, 175)
-[node name="KeyboardButton" parent="VBoxContainer/Control/WASD/Node2D4" instance=ExtResource("2_8nrgi")]
+[node name="KeyboardButton" parent="VBoxContainer/Control/WASD/Node2D4" unique_id=670344825 instance=ExtResource("2_8nrgi")]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
@@ -97,10 +97,10 @@ grow_horizontal = 2
grow_vertical = 2
text = "D"
-[node name="Node2D5" type="Node2D" parent="VBoxContainer/Control/WASD"]
+[node name="Node2D5" type="Node2D" parent="VBoxContainer/Control/WASD" unique_id=1418657218]
position = Vector2(200, 275)
-[node name="Label" type="Label" parent="VBoxContainer/Control/WASD/Node2D5"]
+[node name="Label" type="Label" parent="VBoxContainer/Control/WASD/Node2D5" unique_id=2144646890]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
@@ -116,22 +116,22 @@ theme_override_fonts/font = ExtResource("3_nvtkh")
theme_override_font_sizes/font_size = 40
text = "c.controls_explanation.move"
-[node name="Spacer" type="Control" parent="VBoxContainer"]
+[node name="Spacer" type="Control" parent="VBoxContainer" unique_id=1026478006]
layout_mode = 2
size_flags_horizontal = 3
-[node name="Control2" type="Control" parent="VBoxContainer"]
+[node name="Control2" type="Control" parent="VBoxContainer" unique_id=1412018875]
custom_minimum_size = Vector2(750, 450)
layout_mode = 2
size_flags_vertical = 4
-[node name="JKL" type="Node2D" parent="VBoxContainer/Control2"]
+[node name="JKL" type="Node2D" parent="VBoxContainer/Control2" unique_id=1177184769]
position = Vector2(150, 0)
-[node name="K" type="Node2D" parent="VBoxContainer/Control2/JKL"]
+[node name="K" type="Node2D" parent="VBoxContainer/Control2/JKL" unique_id=774521440]
position = Vector2(200, 175)
-[node name="KeyboardButton" parent="VBoxContainer/Control2/JKL/K" instance=ExtResource("2_8nrgi")]
+[node name="KeyboardButton" parent="VBoxContainer/Control2/JKL/K" unique_id=1633407160 instance=ExtResource("2_8nrgi")]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
@@ -145,10 +145,10 @@ grow_horizontal = 2
grow_vertical = 2
text = "K"
-[node name="J" type="Node2D" parent="VBoxContainer/Control2/JKL"]
+[node name="J" type="Node2D" parent="VBoxContainer/Control2/JKL" unique_id=1136751368]
position = Vector2(125, 175)
-[node name="KeyboardButton" parent="VBoxContainer/Control2/JKL/J" instance=ExtResource("2_8nrgi")]
+[node name="KeyboardButton" parent="VBoxContainer/Control2/JKL/J" unique_id=1132698164 instance=ExtResource("2_8nrgi")]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
@@ -162,10 +162,10 @@ grow_horizontal = 2
grow_vertical = 2
text = "J"
-[node name="L" type="Node2D" parent="VBoxContainer/Control2/JKL"]
+[node name="L" type="Node2D" parent="VBoxContainer/Control2/JKL" unique_id=1442550083]
position = Vector2(275, 175)
-[node name="KeyboardButton" parent="VBoxContainer/Control2/JKL/L" instance=ExtResource("2_8nrgi")]
+[node name="KeyboardButton" parent="VBoxContainer/Control2/JKL/L" unique_id=1327035512 instance=ExtResource("2_8nrgi")]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
@@ -179,10 +179,10 @@ grow_horizontal = 2
grow_vertical = 2
text = "L"
-[node name="LeftHand" type="Node2D" parent="VBoxContainer/Control2/JKL"]
+[node name="LeftHand" type="Node2D" parent="VBoxContainer/Control2/JKL" unique_id=1230277954]
position = Vector2(25, 375)
-[node name="Label" type="Label" parent="VBoxContainer/Control2/JKL/LeftHand"]
+[node name="Label" type="Label" parent="VBoxContainer/Control2/JKL/LeftHand" unique_id=228034435]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
@@ -198,10 +198,10 @@ theme_override_fonts/font = ExtResource("3_nvtkh")
theme_override_font_sizes/font_size = 40
text = "c.controls_explanation.interact_left"
-[node name="RightHand" type="Node2D" parent="VBoxContainer/Control2/JKL"]
+[node name="RightHand" type="Node2D" parent="VBoxContainer/Control2/JKL" unique_id=359568535]
position = Vector2(375, 375)
-[node name="Label" type="Label" parent="VBoxContainer/Control2/JKL/RightHand"]
+[node name="Label" type="Label" parent="VBoxContainer/Control2/JKL/RightHand" unique_id=500510356]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
@@ -217,10 +217,10 @@ theme_override_fonts/font = ExtResource("3_nvtkh")
theme_override_font_sizes/font_size = 40
text = "c.controls_explanation.interact_right"
-[node name="Boost" type="Node2D" parent="VBoxContainer/Control2/JKL"]
+[node name="Boost" type="Node2D" parent="VBoxContainer/Control2/JKL" unique_id=394841057]
position = Vector2(335, 65)
-[node name="Label" type="Label" parent="VBoxContainer/Control2/JKL/Boost"]
+[node name="Label" type="Label" parent="VBoxContainer/Control2/JKL/Boost" unique_id=2055301401]
anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
@@ -232,17 +232,17 @@ theme_override_fonts/font = ExtResource("3_nvtkh")
theme_override_font_sizes/font_size = 40
text = "c.controls_explanation.boost"
-[node name="Sprite2D" type="Sprite2D" parent="VBoxContainer/Control2/JKL"]
+[node name="Sprite2D" type="Sprite2D" parent="VBoxContainer/Control2/JKL" unique_id=1855495404]
position = Vector2(50, 275)
scale = Vector2(0.5, 0.5)
texture = ExtResource("4_mjakv")
-[node name="Sprite2D2" type="Sprite2D" parent="VBoxContainer/Control2/JKL"]
+[node name="Sprite2D2" type="Sprite2D" parent="VBoxContainer/Control2/JKL" unique_id=770199290]
position = Vector2(350, 275)
scale = Vector2(-0.5, 0.5)
texture = ExtResource("4_mjakv")
-[node name="Sprite2D3" type="Sprite2D" parent="VBoxContainer/Control2/JKL"]
+[node name="Sprite2D3" type="Sprite2D" parent="VBoxContainer/Control2/JKL" unique_id=495337642]
position = Vector2(250, 90)
rotation = -1.5707964
scale = Vector2(-0.5, 0.5)
diff --git a/client/gui/overlays/debug/debug.gd b/client/gui/overlays/debug/debug.gd
index 3a37a1b7..51bd0a48 100644
--- a/client/gui/overlays/debug/debug.gd
+++ b/client/gui/overlays/debug/debug.gd
@@ -1,5 +1,5 @@
# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
+# Copyright (C) 2026 Hurry Curry! Contributors
#
# 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
@@ -16,7 +16,7 @@
extends RichTextLabel
func _ready():
- Settings.hook_changed_init("graphics.debug_info", "main", func (v):
+ Settings.hook_changed_init("graphics.debug_info", self, func (v):
visible = v
RenderingServer.viewport_set_measure_render_time(get_viewport().get_viewport_rid(), visible)
)
diff --git a/client/gui/overlays/debug/debug.tscn b/client/gui/overlays/debug/debug.tscn
index c794c161..0013f4ad 100644
--- a/client/gui/overlays/debug/debug.tscn
+++ b/client/gui/overlays/debug/debug.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=6 format=3 uid="uid://3lytexnfrub6"]
+[gd_scene format=3 uid="uid://3lytexnfrub6"]
[ext_resource type="Script" uid="uid://bpmdfuqjtwf5v" path="res://gui/overlays/debug/debug.gd" id="1_62otr"]
[ext_resource type="Script" uid="uid://byshs20og68tn" path="res://gui/components/smart_margin_container.gd" id="1_c21gy"]
@@ -11,7 +11,8 @@ variation_opentype = {
2003265652: 700
}
-[node name="SmartMarginContainer" type="MarginContainer"]
+[node name="SmartMarginContainer" type="MarginContainer" unique_id=207473556]
+z_index = 99
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
@@ -25,7 +26,7 @@ theme_override_constants/margin_bottom = 10
script = ExtResource("1_c21gy")
metadata/_custom_type_script = "uid://byshs20og68tn"
-[node name="Debug" type="RichTextLabel" parent="."]
+[node name="Debug" type="RichTextLabel" parent="." unique_id=599133286]
visible = false
layout_mode = 2
mouse_filter = 2
@@ -33,7 +34,7 @@ theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 10
script = ExtResource("1_62otr")
-[node name="DebugPie" type="Control" parent="."]
+[node name="DebugPie" type="Control" parent="." unique_id=1967345075]
visible = false
layout_mode = 2
size_flags_horizontal = 8
diff --git a/client/gui/overlays/debug/debug_pie.gd b/client/gui/overlays/debug/debug_pie.gd
index 02201776..ce32c93a 100644
--- a/client/gui/overlays/debug/debug_pie.gd
+++ b/client/gui/overlays/debug/debug_pie.gd
@@ -1,5 +1,5 @@
# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
+# Copyright (C) 2026 Hurry Curry! Contributors
#
# 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
diff --git a/client/gui/overlays/debug/pie.tscn b/client/gui/overlays/debug/pie.tscn
index 69872d72..bb65703c 100644
--- a/client/gui/overlays/debug/pie.tscn
+++ b/client/gui/overlays/debug/pie.tscn
@@ -1,6 +1,6 @@
[gd_scene format=3 uid="uid://27qwbrf7mh7i"]
-[node name="DebugPie" type="Control"]
+[node name="DebugPie" type="Control" unique_id=12646477]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
diff --git a/client/gui/overlays/lobby/lobby.gd b/client/gui/overlays/lobby/lobby.gd
deleted file mode 100644
index 2b40cada..00000000
--- a/client/gui/overlays/lobby/lobby.gd
+++ /dev/null
@@ -1,181 +0,0 @@
-# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
-#
-# 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 Control
-class_name Lobby
-
-const MAX_BOT_COUNT_PER_TYPE: int = 3
-const PLAYER = preload("res://gui/overlays/lobby/player.tscn")
-
-var map_count
-var selected_map := 0
-var selected_map_name: String
-
-var bots_enabled := false
-var bot_counts := {}
-var bot_reset_buttons := {}
-var bot_inc_buttons := {}
-var bot_dec_buttons := {}
-
-@onready var game: Game = $"../../Game" # TODO
-@onready var player_container = $PlayerList/VBoxContainer/Players
-
-@onready var map_name_label = $Sidebar/Bottom/MarginContainer/VBoxContainer/HBoxContainer/Map/Name
-@onready var map_player_label = $Sidebar/Bottom/MarginContainer/VBoxContainer/HBoxContainer/Map/Players
-@onready var map_difficulty_label = $Sidebar/Bottom/MarginContainer/VBoxContainer/HBoxContainer/Map/Difficulty
-@onready var map_list_container = $Sidebar/Bottom/MarginContainer/VBoxContainer/MapList/VBoxContainer
-
-@onready var prev_map = $Sidebar/Bottom/MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/Left
-@onready var next_map = $Sidebar/Bottom/MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer2/Right
-
-@onready var bots_container = $Sidebar/Bottom/MarginContainer/VBoxContainer/Bots
-@onready var bot_settings = $Sidebar/Bottom/MarginContainer/VBoxContainer/Bots/ScrollContainerCustom/BotSettings
-@onready var bot_settings_conainer = $Sidebar/Bottom/MarginContainer/VBoxContainer/Bots/ScrollContainerCustom
-
-func _ready():
- game.update_players.connect(update_players)
- initialize()
- game.data_updated.connect(initialize)
- game.join_state_updated.connect(_update_visible)
- game.in_lobby_updated.connect(_update_visible)
- _update_visible(false)
- check_for_music()
-
-func initialize():
- map_count = game.maps.size()
-
- for c in map_list_container.get_children():
- c.queue_free()
- for c in bot_settings.get_children():
- c.queue_free()
-
- var i := 0
- for m in game.maps:
- var b := Button.new()
- b.name = m[0]
- b.text = "%s (%d)" % [m[1]["name"], m[1]["players"]]
- b.pressed.connect(select_map.bind(i))
- b.focus_entered.connect(select_map.bind(i))
- map_list_container.add_child(b)
- i += 1
- select_map(0)
-
- for algo_id: String in game.bot_algos:
- if algo_id == "customer" or algo_id == "test":
- continue
-
- bot_counts[algo_id] = 0
-
- var h := HBoxContainer.new()
- h.name = algo_id
- var add := Button.new()
- add.text = "+"
- var reset := Button.new()
- reset.size_flags_horizontal = SIZE_EXPAND_FILL
- var remove := Button.new()
- remove.text = "-"
- bot_reset_buttons[algo_id] = reset
- bot_inc_buttons[algo_id] = add
- bot_dec_buttons[algo_id] = remove
- update_bot_reset_text(algo_id)
- add.pressed.connect(increase_bot_count.bind(algo_id))
- reset.pressed.connect(reset_bot_count.bind(algo_id))
- remove.pressed.connect(decrease_bot_count.bind(algo_id))
- h.add_child(remove)
- h.add_child(reset)
- h.add_child(add)
- bot_settings.add_child(h)
-
-func select_map(i: int):
- if i >= map_count:
- return
- selected_map = i
- var map_data: Dictionary = game.maps[i][1]
- map_name_label.text = map_data["name"]
- map_player_label.text = tr("c.map.players_recommended").format([roundi(map_data["players"])])
- map_difficulty_label.text = tr("c.map.difficulty.%d" % (map_data["difficulty"] - 1))
- selected_map_name = game.maps[i][0]
- if not game.menu.covered:
- map_list_container.get_child(i).grab_focus()
-
-func increase_bot_count(algo_id: String):
- bot_counts[algo_id] += 1
- update_bot_reset_text(algo_id)
-
-func decrease_bot_count(algo_id: String):
- bot_counts[algo_id] -= 1
- update_bot_reset_text(algo_id)
-
-func reset_bot_count(algo_id: String):
- bot_counts[algo_id] = 0
- update_bot_reset_text(algo_id)
-
-func update_bot_reset_text(algo_id: String):
- var display_name: String = tr("s.bot.%s" % algo_id)
- bot_reset_buttons[algo_id].text = "%s (%d)" % [display_name, bot_counts[algo_id]]
- bot_inc_buttons[algo_id].disabled = not bot_counts[algo_id] < MAX_BOT_COUNT_PER_TYPE
- bot_dec_buttons[algo_id].disabled = not bot_counts[algo_id] > 0
-
-func update_players(player_list: Dictionary):
- for i in player_container.get_children():
- i.queue_free()
-
- for i in player_list.keys():
- var p: PlayerTag = PLAYER.instantiate()
- player_container.add_child(p)
- p.setup(player_list[i].username)
-
-func _input(_event):
- if not visible:
- return
-
- if Input.is_action_just_pressed("previous") and not prev_map.disabled:
- prev_map.emit_signal("pressed")
- elif Input.is_action_just_pressed("next") and not next_map.disabled:
- next_map.emit_signal("pressed")
-
-func _on_left_pressed():
- selected_map = (selected_map - 1) % map_count
- select_map(selected_map)
-
-func _on_right_pressed():
- selected_map = (selected_map + 1) % map_count
- select_map(selected_map)
-
-func _on_start_pressed():
- if selected_map_name != null:
- var start_msg := "/start %s" % selected_map_name
-
- if bots_enabled:
- for k in bot_counts.keys():
- for i in range(bot_counts[k]):
- start_msg += "\ncreate-bot %s" % k
-
- game.mp.send_chat(game.my_player_id, start_msg)
- Sound.play_music("stop") # TODO: Game music enter
-
-func _update_visible(_state: bool):
- visible = game.in_lobby and game.join_state == Game.JoinState.JOINED
-
-func check_for_music():
- if visible:
- Sound.play_music("Lobby")
- else:
- Sound.play_music("stop") # TODO: Game music enter
-
-func _on_enable_bots_toggled(toggled_on):
- bots_enabled = toggled_on
- bot_settings_conainer.visible = toggled_on
- bots_container.size_flags_vertical = SIZE_EXPAND_FILL if toggled_on else SIZE_FILL
diff --git a/client/gui/overlays/lobby/lobby.gd.uid b/client/gui/overlays/lobby/lobby.gd.uid
deleted file mode 100644
index b92e8681..00000000
--- a/client/gui/overlays/lobby/lobby.gd.uid
+++ /dev/null
@@ -1 +0,0 @@
-uid://bssjvsu44l0fn
diff --git a/client/gui/overlays/lobby/lobby.tscn b/client/gui/overlays/lobby/lobby.tscn
deleted file mode 100644
index 28959838..00000000
--- a/client/gui/overlays/lobby/lobby.tscn
+++ /dev/null
@@ -1,182 +0,0 @@
-[gd_scene load_steps=16 format=3 uid="uid://bc50la65ntifb"]
-
-[ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://gui/resources/theme/theme.tres" id="1_u18ke"]
-[ext_resource type="Script" uid="uid://bssjvsu44l0fn" path="res://gui/overlays/lobby/lobby.gd" id="2_7657i"]
-[ext_resource type="StyleBox" uid="uid://de80aw86emnql" path="res://gui/resources/style/lobby_panel_override.tres" id="3_6iqoe"]
-[ext_resource type="Material" uid="uid://beea1pc5nt67r" path="res://gui/resources/materials/dark_blur_material.tres" id="3_esmbx"]
-[ext_resource type="Texture2D" uid="uid://35rd5gamtyqm" path="res://gui/resources/icons/arrow.svg" id="3_jxleg"]
-[ext_resource type="Texture2D" uid="uid://j75dbytlbju" path="res://gui/resources/icons/arrow_pressed.svg" id="4_eapmn"]
-[ext_resource type="Script" uid="uid://cmncjc06kadpe" path="res://gui/components/blur_setup.gd" id="5_am8pt"]
-[ext_resource type="Texture2D" uid="uid://b33qmctbpf48g" path="res://gui/resources/icons/arrow_hover.svg" id="5_odwav"]
-[ext_resource type="Script" uid="uid://byshs20og68tn" path="res://gui/components/smart_margin_container.gd" id="6_7mu2u"]
-[ext_resource type="Texture2D" uid="uid://by3qsrpxnfq4w" path="res://gui/resources/icons/arrow_focus.svg" id="6_tulu3"]
-[ext_resource type="FontFile" uid="uid://5ixo6b3bd3km" path="res://gui/resources/fonts/font-josefin-sans.woff2" id="8_cwbpa"]
-[ext_resource type="Texture2D" uid="uid://bsx6fo7mv2u6a" path="res://gui/resources/icons/controller_x.svg" id="9_q14bw"]
-[ext_resource type="Script" uid="uid://bd7bylb2t2m0" path="res://gui/components/touch_scroll_container.gd" id="10_bgene"]
-[ext_resource type="Script" uid="uid://b1eomxildrq30" path="res://gui/components/controller_button.gd" id="12_7mu2u"]
-
-[sub_resource type="FontVariation" id="FontVariation_5xxr2"]
-base_font = ExtResource("8_cwbpa")
-variation_opentype = {
-2003265652: 700
-}
-
-[node name="Lobby" type="Control" groups=["no_auto_focus"]]
-layout_mode = 3
-anchors_preset = 15
-anchor_right = 1.0
-anchor_bottom = 1.0
-grow_horizontal = 2
-grow_vertical = 2
-theme = ExtResource("1_u18ke")
-script = ExtResource("2_7657i")
-
-[node name="PlayerList" type="MarginContainer" parent="."]
-layout_mode = 1
-anchors_preset = 15
-anchor_right = 1.0
-anchor_bottom = 1.0
-grow_horizontal = 2
-grow_vertical = 2
-mouse_filter = 2
-theme_override_constants/margin_left = 342
-theme_override_constants/margin_top = 32
-theme_override_constants/margin_right = 342
-theme_override_constants/margin_bottom = 32
-
-[node name="VBoxContainer" type="VBoxContainer" parent="PlayerList"]
-layout_mode = 2
-
-[node name="Players" type="HBoxContainer" parent="PlayerList/VBoxContainer"]
-layout_mode = 2
-alignment = 1
-
-[node name="Sidebar" type="HBoxContainer" parent="."]
-layout_mode = 1
-anchors_preset = 15
-anchor_right = 1.0
-anchor_bottom = 1.0
-grow_horizontal = 2
-grow_vertical = 2
-alignment = 2
-
-[node name="Bottom" type="PanelContainer" parent="Sidebar"]
-material = ExtResource("3_esmbx")
-layout_mode = 2
-theme_override_styles/panel = ExtResource("3_6iqoe")
-script = ExtResource("5_am8pt")
-
-[node name="MarginContainer" type="MarginContainer" parent="Sidebar/Bottom"]
-layout_mode = 2
-script = ExtResource("6_7mu2u")
-
-[node name="VBoxContainer" type="VBoxContainer" parent="Sidebar/Bottom/MarginContainer"]
-layout_mode = 2
-theme_override_constants/separation = 24
-
-[node name="HBoxContainer" type="HBoxContainer" parent="Sidebar/Bottom/MarginContainer/VBoxContainer"]
-layout_direction = 2
-layout_mode = 2
-alignment = 1
-
-[node name="VBoxContainer" type="VBoxContainer" parent="Sidebar/Bottom/MarginContainer/VBoxContainer/HBoxContainer"]
-layout_mode = 2
-alignment = 1
-
-[node name="Left" type="TextureButton" parent="Sidebar/Bottom/MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer"]
-custom_minimum_size = Vector2(19, 28)
-layout_mode = 2
-focus_mode = 0
-texture_normal = ExtResource("3_jxleg")
-texture_pressed = ExtResource("4_eapmn")
-texture_hover = ExtResource("5_odwav")
-texture_focused = ExtResource("6_tulu3")
-ignore_texture_size = true
-stretch_mode = 4
-flip_h = true
-
-[node name="Map" type="VBoxContainer" parent="Sidebar/Bottom/MarginContainer/VBoxContainer/HBoxContainer"]
-layout_mode = 2
-
-[node name="Name" type="Label" parent="Sidebar/Bottom/MarginContainer/VBoxContainer/HBoxContainer/Map"]
-custom_minimum_size = Vector2(200, 0)
-layout_mode = 2
-theme_override_fonts/font = SubResource("FontVariation_5xxr2")
-theme_override_font_sizes/font_size = 24
-text = "Map name"
-horizontal_alignment = 1
-vertical_alignment = 1
-
-[node name="Players" type="Label" parent="Sidebar/Bottom/MarginContainer/VBoxContainer/HBoxContainer/Map"]
-layout_mode = 2
-text = "Players"
-horizontal_alignment = 1
-vertical_alignment = 1
-
-[node name="Difficulty" type="Label" parent="Sidebar/Bottom/MarginContainer/VBoxContainer/HBoxContainer/Map"]
-layout_mode = 2
-text = "Difficulty"
-horizontal_alignment = 1
-vertical_alignment = 1
-
-[node name="VBoxContainer2" type="VBoxContainer" parent="Sidebar/Bottom/MarginContainer/VBoxContainer/HBoxContainer"]
-layout_mode = 2
-alignment = 1
-
-[node name="Right" type="TextureButton" parent="Sidebar/Bottom/MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer2"]
-custom_minimum_size = Vector2(19, 28)
-layout_mode = 2
-focus_mode = 0
-texture_normal = ExtResource("3_jxleg")
-texture_pressed = ExtResource("4_eapmn")
-texture_hover = ExtResource("5_odwav")
-texture_focused = ExtResource("6_tulu3")
-ignore_texture_size = true
-stretch_mode = 4
-
-[node name="MapList" type="ScrollContainer" parent="Sidebar/Bottom/MarginContainer/VBoxContainer"]
-layout_mode = 2
-size_flags_vertical = 3
-script = ExtResource("10_bgene")
-
-[node name="VBoxContainer" type="VBoxContainer" parent="Sidebar/Bottom/MarginContainer/VBoxContainer/MapList"]
-layout_mode = 2
-size_flags_horizontal = 3
-
-[node name="Bots" type="VBoxContainer" parent="Sidebar/Bottom/MarginContainer/VBoxContainer"]
-layout_mode = 2
-
-[node name="EnableBots" type="CheckButton" parent="Sidebar/Bottom/MarginContainer/VBoxContainer/Bots"]
-layout_mode = 2
-text = "c.menu.lobby.enable_bots"
-
-[node name="ScrollContainerCustom" type="ScrollContainer" parent="Sidebar/Bottom/MarginContainer/VBoxContainer/Bots"]
-visible = false
-layout_mode = 2
-size_flags_vertical = 3
-script = ExtResource("10_bgene")
-
-[node name="BotSettings" type="VBoxContainer" parent="Sidebar/Bottom/MarginContainer/VBoxContainer/Bots/ScrollContainerCustom"]
-layout_mode = 2
-size_flags_horizontal = 3
-size_flags_vertical = 3
-
-[node name="VBoxContainer" type="VBoxContainer" parent="Sidebar/Bottom/MarginContainer/VBoxContainer"]
-layout_mode = 2
-theme_override_constants/separation = 15
-alignment = 1
-
-[node name="Start" type="Button" parent="Sidebar/Bottom/MarginContainer/VBoxContainer/VBoxContainer"]
-layout_mode = 2
-text = "c.menu.lobby.start"
-expand_icon = true
-script = ExtResource("12_7mu2u")
-controller_texture = ExtResource("9_q14bw")
-press_action = "start_game"
-metadata/_custom_type_script = "uid://b1eomxildrq30"
-
-[connection signal="visibility_changed" from="." to="." method="check_for_music"]
-[connection signal="pressed" from="Sidebar/Bottom/MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/Left" to="." method="_on_left_pressed"]
-[connection signal="pressed" from="Sidebar/Bottom/MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer2/Right" to="." method="_on_right_pressed"]
-[connection signal="toggled" from="Sidebar/Bottom/MarginContainer/VBoxContainer/Bots/EnableBots" to="." method="_on_enable_bots_toggled"]
-[connection signal="pressed" from="Sidebar/Bottom/MarginContainer/VBoxContainer/VBoxContainer/Start" to="." method="_on_start_pressed"]
diff --git a/client/gui/overlays/lobby/player.gd b/client/gui/overlays/lobby/player.gd
index 175d6341..5b2b50e4 100644
--- a/client/gui/overlays/lobby/player.gd
+++ b/client/gui/overlays/lobby/player.gd
@@ -1,5 +1,5 @@
# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
+# Copyright (C) 2026 Hurry Curry! Contributors
#
# 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
diff --git a/client/gui/overlays/lobby/player.tscn b/client/gui/overlays/lobby/player.tscn
index aa8997a1..4c924fb9 100644
--- a/client/gui/overlays/lobby/player.tscn
+++ b/client/gui/overlays/lobby/player.tscn
@@ -1,6 +1,6 @@
-[gd_scene load_steps=6 format=3 uid="uid://gmldnel4xbxy"]
+[gd_scene format=3 uid="uid://gmldnel4xbxy"]
-[ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://gui/resources/theme/theme.tres" id="1_flfqn"]
+[ext_resource type="Material" uid="uid://beea1pc5nt67r" path="res://gui/resources/materials/dark_blur_material.tres" id="1_jy1rs"]
[ext_resource type="Texture2D" uid="uid://222w1wha75od" path="res://gui/resources/icons/user.webp" id="2_mnaqt"]
[ext_resource type="Script" uid="uid://buxb488rr2ncs" path="res://gui/overlays/lobby/player.gd" id="2_w3lyk"]
@@ -14,29 +14,29 @@ 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
+[node name="Player" type="PanelContainer" unique_id=141359444]
+material = ExtResource("1_jy1rs")
+offset_right = 98.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="."]
+[node name="MarginContainer" type="MarginContainer" parent="." unique_id=2016059636]
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"]
+[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer" unique_id=1039786929]
layout_mode = 2
-[node name="Icon" type="TextureRect" parent="MarginContainer/HBoxContainer"]
+[node name="Icon" type="TextureRect" parent="MarginContainer/HBoxContainer" unique_id=1840719777]
layout_mode = 2
texture = ExtResource("2_mnaqt")
expand_mode = 2
-[node name="Label" type="Label" parent="MarginContainer/HBoxContainer"]
+[node name="Label" type="Label" parent="MarginContainer/HBoxContainer" unique_id=895904561]
layout_mode = 2
theme_override_styles/normal = SubResource("StyleBoxEmpty_3yp6e")
text = "Player"
diff --git a/client/gui/overlays/overlays.gd b/client/gui/overlays/overlays.gd
index 9971ea53..fc24fb2d 100644
--- a/client/gui/overlays/overlays.gd
+++ b/client/gui/overlays/overlays.gd
@@ -1,5 +1,5 @@
# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
+# Copyright (C) 2026 Hurry Curry! Contributors
#
# 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
@@ -17,7 +17,7 @@ extends Control
class_name Overlays
func _ready():
- Settings.hook_changed_init("ui.hide_overlays", "main", func (v): visible = not v)
+ Settings.hook_changed_init("ui.hide_overlays", self, func (v): visible = not v)
func _input(_event):
if Input.is_action_just_pressed("toggle_overlay"):
diff --git a/client/gui/overlays/overlays.tscn b/client/gui/overlays/overlays.tscn
index 93717736..158ec403 100644
--- a/client/gui/overlays/overlays.tscn
+++ b/client/gui/overlays/overlays.tscn
@@ -1,15 +1,14 @@
-[gd_scene load_steps=9 format=3 uid="uid://cr26jennm5c0c"]
+[gd_scene format=3 uid="uid://cr26jennm5c0c"]
[ext_resource type="Script" uid="uid://bkvtm1jlme6jf" path="res://gui/overlays/overlays.gd" id="1_dcvak"]
[ext_resource type="PackedScene" uid="uid://xcxbmynn8mhi" path="res://gui/overlays/chat.tscn" id="1_n4uhr"]
[ext_resource type="PackedScene" uid="uid://bpikve6wlsjfl" path="res://gui/overlays/score.tscn" id="2_whygm"]
[ext_resource type="PackedScene" uid="uid://dcrr1rwdwbkq8" path="res://gui/overlays/pinned_messages.tscn" id="3_dcvak"]
-[ext_resource type="PackedScene" uid="uid://bc50la65ntifb" path="res://gui/overlays/lobby/lobby.tscn" id="4_jwd7s"]
[ext_resource type="PackedScene" uid="uid://c7pykhpdhgs64" path="res://gui/overlays/announce_title.tscn" id="5_whygm"]
[ext_resource type="PackedScene" uid="uid://b21nrnkygiyjt" path="res://gui/overlays/popup_message/popup_message.tscn" id="7_jwd7s"]
[ext_resource type="PackedScene" uid="uid://3lytexnfrub6" path="res://gui/overlays/debug/debug.tscn" id="8_8ouu3"]
-[node name="Overlays" type="Control"]
+[node name="Overlays" type="Control" unique_id=2071182967]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
@@ -18,19 +17,16 @@ grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_dcvak")
-[node name="ChatPreview" parent="." instance=ExtResource("1_n4uhr")]
+[node name="PinnedMessages" parent="." unique_id=1769024201 instance=ExtResource("3_dcvak")]
layout_mode = 1
-[node name="Score" parent="." instance=ExtResource("2_whygm")]
+[node name="Score" parent="." unique_id=2068981342 instance=ExtResource("2_whygm")]
layout_mode = 1
-[node name="PinnedMessages" parent="." instance=ExtResource("3_dcvak")]
+[node name="ChatPreview" parent="." unique_id=1306284704 instance=ExtResource("1_n4uhr")]
layout_mode = 1
-[node name="Lobby" parent="." instance=ExtResource("4_jwd7s")]
-layout_mode = 1
-
-[node name="AnnounceTitle" parent="." instance=ExtResource("5_whygm")]
+[node name="AnnounceTitle" parent="." unique_id=1456313117 instance=ExtResource("5_whygm")]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@@ -38,8 +34,8 @@ anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
-[node name="PopupMessage" parent="." instance=ExtResource("7_jwd7s")]
+[node name="PopupMessage" parent="." unique_id=1024925196 instance=ExtResource("7_jwd7s")]
layout_mode = 1
-[node name="Debug" parent="." instance=ExtResource("8_8ouu3")]
+[node name="Debug" parent="." unique_id=2125601218 instance=ExtResource("8_8ouu3")]
layout_mode = 1
diff --git a/client/gui/overlays/pinned_messages.gd b/client/gui/overlays/pinned_messages.gd
index fe82f904..1cca455d 100644
--- a/client/gui/overlays/pinned_messages.gd
+++ b/client/gui/overlays/pinned_messages.gd
@@ -1,5 +1,5 @@
# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
+# Copyright (C) 2026 Hurry Curry! Contributors
#
# 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
diff --git a/client/gui/overlays/pinned_messages.tscn b/client/gui/overlays/pinned_messages.tscn
index 318c9b85..a09eddee 100644
--- a/client/gui/overlays/pinned_messages.tscn
+++ b/client/gui/overlays/pinned_messages.tscn
@@ -1,8 +1,8 @@
-[gd_scene load_steps=2 format=3 uid="uid://dcrr1rwdwbkq8"]
+[gd_scene format=3 uid="uid://dcrr1rwdwbkq8"]
[ext_resource type="Script" uid="uid://c0k6f1wkynbkd" path="res://gui/overlays/pinned_messages.gd" id="1_q0jkk"]
-[node name="PinnedItemMessages" type="Control"]
+[node name="PinnedItemMessages" type="Control" unique_id=1436447205]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
@@ -12,7 +12,7 @@ grow_vertical = 2
mouse_filter = 2
script = ExtResource("1_q0jkk")
-[node name="HBoxContainer" type="HBoxContainer" parent="."]
+[node name="HBoxContainer" type="HBoxContainer" parent="." unique_id=15845709]
layout_direction = 2
layout_mode = 1
anchors_preset = 10
diff --git a/client/gui/overlays/popup_message/font_variation.tres b/client/gui/overlays/popup_message/font_variation.tres
new file mode 100644
index 00000000..84254e1c
--- /dev/null
+++ b/client/gui/overlays/popup_message/font_variation.tres
@@ -0,0 +1,10 @@
+[gd_resource type="FontVariation" format=3 uid="uid://c4g6ucr5piwy1"]
+
+[ext_resource type="FontFile" uid="uid://bk704sc5gkrb3" path="res://gui/resources/fonts/font-azaret-mono.woff2" id="1_gewoj"]
+
+[resource]
+resource_local_to_scene = true
+base_font = ExtResource("1_gewoj")
+variation_opentype = {
+2003265652: 400
+}
diff --git a/client/gui/overlays/popup_message/popup_message.gd b/client/gui/overlays/popup_message/popup_message.gd
index 4ea5aa2f..0fd88b78 100644
--- a/client/gui/overlays/popup_message/popup_message.gd
+++ b/client/gui/overlays/popup_message/popup_message.gd
@@ -1,5 +1,5 @@
# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
+# Copyright (C) 2026 Hurry Curry! Contributors
#
# 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
@@ -22,17 +22,20 @@ var positional_messages = {}
@onready var positional_messages_node: Control = $Positional
@onready var server_msg = $Static/VBox/ServerMessage
-@onready var server_msg_label: Label = $Static/VBox/ServerMessage/CenterContainer/Label
+@onready var server_hint = $Static/VBox/ServerHint
@onready var server_msg_timer: Timer = $ServerMessage
@onready var game: Game = $"../../Game" # TODO
func _process(_delta: float):
for pos: Vector2 in positional_messages.keys():
+ var camera: Camera3D = get_viewport().get_camera_3d()
var msg: PositionalMessage = positional_messages[pos]
var pos_3d = Vector3(pos.x + 0.5, 1.5, pos.y + 0.5)
- var pos_2d = get_viewport().get_camera_3d().unproject_position(pos_3d)
-
+ var pos_2d = camera.unproject_position(pos_3d)
+ var behind = camera.is_position_behind(pos_3d)
+
+ msg.node_2d.visible = not behind
msg.node_2d.position = pos_2d.clamp(
Vector2.ZERO + 0.5 * msg.node.size,
Vector2(get_viewport_rect().size) - 0.5 * msg.node.size
@@ -42,17 +45,20 @@ func _process(_delta: float):
msg.last_size = msg.node.size
msg.node.position = -0.5 * msg.last_size
-func display_server_msg(msg: String, auto_remove := true):
+func display_server_hint(msg):
+ server_hint.show()
+ server_hint.set_text(msg)
+
+func display_server_msg(msg, auto_remove := true):
server_msg.show()
- server_msg_label.text = msg
-
+ server_msg.set_text(msg)
if auto_remove:
server_msg_timer.start()
func _on_server_timeout() -> void:
clear_server_msg()
-func display_server_msg_positional(text: String, pos: Vector2, use_monospace: bool):
+func display_server_hint_positional(text, pos: Vector2, use_monospace: bool):
var msg := PositionalMessage.new()
msg.node = SERVER_MESSAGE_SCENE.instantiate()
msg.node_2d = Node2D.new()
@@ -63,10 +69,13 @@ func display_server_msg_positional(text: String, pos: Vector2, use_monospace: bo
msg.position = pos
positional_messages[pos] = msg
-func clear_server_msg(position_ = null):
+func clear_server_msg():
+ server_msg_timer.stop()
+ server_msg.hide()
+
+func clear_server_hint(position_ = null):
if position_ == null:
- server_msg_timer.stop()
- server_msg.hide()
+ server_hint.hide()
else:
if position_ in positional_messages:
var msg: PositionalMessage = positional_messages[position_]
diff --git a/client/gui/overlays/popup_message/popup_message.tscn b/client/gui/overlays/popup_message/popup_message.tscn
index fab35e3e..dd6c1bc8 100644
--- a/client/gui/overlays/popup_message/popup_message.tscn
+++ b/client/gui/overlays/popup_message/popup_message.tscn
@@ -1,10 +1,9 @@
-[gd_scene load_steps=4 format=3 uid="uid://b21nrnkygiyjt"]
+[gd_scene format=3 uid="uid://b21nrnkygiyjt"]
-[ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://gui/resources/theme/theme.tres" id="1_a1566"]
[ext_resource type="Script" uid="uid://c2cx41lrgf5b0" path="res://gui/overlays/popup_message/popup_message.gd" id="2_sbew6"]
[ext_resource type="PackedScene" uid="uid://dq61p3a8og2b6" path="res://gui/overlays/popup_message/server_message.tscn" id="3_m3rok"]
-[node name="PopupMessage" type="Control"]
+[node name="PopupMessage" type="Control" unique_id=739397547]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
@@ -14,11 +13,11 @@ grow_vertical = 2
mouse_filter = 2
script = ExtResource("2_sbew6")
-[node name="ServerMessage" type="Timer" parent="."]
+[node name="ServerMessage" type="Timer" parent="." unique_id=265858330]
wait_time = 5.0
one_shot = true
-[node name="Static" type="MarginContainer" parent="."]
+[node name="Static" type="MarginContainer" parent="." unique_id=138464647]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@@ -26,17 +25,20 @@ anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
-theme = ExtResource("1_a1566")
-[node name="VBox" type="VBoxContainer" parent="Static"]
+[node name="VBox" type="VBoxContainer" parent="Static" unique_id=312654300]
layout_mode = 2
mouse_filter = 2
-[node name="ServerMessage" parent="Static/VBox" instance=ExtResource("3_m3rok")]
+[node name="ServerMessage" parent="Static/VBox" unique_id=337238699 instance=ExtResource("3_m3rok")]
visible = false
layout_mode = 2
-[node name="Positional" type="Control" parent="."]
+[node name="ServerHint" parent="Static/VBox" unique_id=704424213 instance=ExtResource("3_m3rok")]
+visible = false
+layout_mode = 2
+
+[node name="Positional" type="Control" parent="." unique_id=610159147]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
diff --git a/client/gui/overlays/popup_message/server_message.gd b/client/gui/overlays/popup_message/server_message.gd
index a0688dc5..a17ff612 100644
--- a/client/gui/overlays/popup_message/server_message.gd
+++ b/client/gui/overlays/popup_message/server_message.gd
@@ -1,13 +1,69 @@
+# Hurry Curry! - a game about cooking
+# Copyright (C) 2026 Hurry Curry! Contributors
+#
+# 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 BlurSetup
class_name ServerMessage
const DEFAULT_FONT = preload("res://gui/resources/fonts/font-josefin-sans.woff2")
const MONOSPACE_FONT = preload("res://gui/resources/fonts/font-azaret-mono.woff2")
+const RENDERER = preload("res://gui/components/message/renderer.tscn")
-@onready var label: Label = $CenterContainer/Label
+@onready var flow: VFlowContainer = $CenterContainer/VFlowContainer
-func set_text(text: String, use_monospace := true):
- label.text = text
- var font: FontVariation = label.get_theme_font("font")
+func set_text(text, use_monospace := true):
+ for c: Node in flow.get_children():
+ c.queue_free()
+ if text is String:
+ flow.add_child(build_label(text, use_monospace))
+ elif text is Array:
+ for e: MessageParser in text:
+ var c: Control = build_message(e, use_monospace)
+ c.size_flags_horizontal = Control.SIZE_SHRINK_BEGIN
+ c.size_flags_vertical = Control.SIZE_EXPAND_FILL
+ flow.add_child(c)
+
+static func font_size(use_monospace: bool):
+ return 16 if use_monospace else 20
+
+func build_label(text: String, use_monospace: bool) -> Label:
+ var label = Label.new()
+ var font: FontVariation = preload("res://gui/overlays/popup_message/font_variation.tres")
+ var sb := StyleBoxEmpty.new()
font.base_font = MONOSPACE_FONT if use_monospace else DEFAULT_FONT
- label.add_theme_font_size_override("font_size", 16 if use_monospace else 20)
+ label.add_theme_font_size_override("font_size", font_size(use_monospace))
+ label.add_theme_font_override("font", font)
+ label.add_theme_color_override("font_color", Color.BLACK)
+ label.add_theme_stylebox_override("normal", sb)
+ label.autowrap_mode = TextServer.AUTOWRAP_OFF
+ label.text = text
+ label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
+ label.update_minimum_size()
+ return label
+
+func build_message(m: MessageParser, use_monospace: bool) -> Control:
+ match m.kind:
+ MessageParser.Kind.ITEM:
+ var r: Renderer = RENDERER.instantiate()
+ r.get_node("SubViewport").size = Vector2i.ONE * font_size(use_monospace) * 2
+ r.setup_item(m.result)
+ return r
+ MessageParser.Kind.TILE:
+ var r: Renderer = RENDERER.instantiate()
+ r.get_node("SubViewport").size = Vector2i.ONE * font_size(use_monospace) * 2
+ r.setup_tile([m.result])
+ return r
+ MessageParser.Kind.TEXT:
+ return build_label(m.result, use_monospace)
+ return null
diff --git a/client/gui/overlays/popup_message/server_message.tscn b/client/gui/overlays/popup_message/server_message.tscn
index 255c5e56..e64cad79 100644
--- a/client/gui/overlays/popup_message/server_message.tscn
+++ b/client/gui/overlays/popup_message/server_message.tscn
@@ -1,8 +1,7 @@
-[gd_scene load_steps=8 format=3 uid="uid://dq61p3a8og2b6"]
+[gd_scene format=3 uid="uid://dq61p3a8og2b6"]
[ext_resource type="Shader" uid="uid://cwldxegcj55if" path="res://gui/resources/shaders/blur_mix.gdshader" id="1_qv8ew"]
[ext_resource type="Script" uid="uid://dfgwh7x7sqc21" path="res://gui/overlays/popup_message/server_message.gd" id="2_csqo8"]
-[ext_resource type="FontFile" uid="uid://bk704sc5gkrb3" path="res://gui/resources/fonts/font-azaret-mono.woff2" id="3_dw20j"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_q3bbd"]
shader = ExtResource("1_qv8ew")
@@ -19,35 +18,27 @@ corner_radius_top_right = 16
corner_radius_bottom_right = 16
corner_radius_bottom_left = 16
-[sub_resource type="FontVariation" id="FontVariation_qfltj"]
-resource_local_to_scene = true
-base_font = ExtResource("3_dw20j")
-variation_opentype = {
-2003265652: 400
-}
-
-[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_3rgop"]
-content_margin_left = 32.0
-content_margin_top = 8.0
-content_margin_right = 32.0
-content_margin_bottom = 8.0
-
-[node name="ServerMessage" type="PanelContainer"]
+[node name="ServerMessage" type="PanelContainer" unique_id=241738499]
material = SubResource("ShaderMaterial_q3bbd")
+offset_right = 210.0
+offset_bottom = 35.0
size_flags_horizontal = 4
size_flags_vertical = 0
mouse_filter = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_vq4dg")
script = ExtResource("2_csqo8")
-[node name="CenterContainer" type="CenterContainer" parent="."]
+[node name="CenterContainer" type="MarginContainer" parent="." unique_id=1965686626]
layout_mode = 2
mouse_filter = 2
+theme_override_constants/margin_left = 32
+theme_override_constants/margin_top = 8
+theme_override_constants/margin_right = 32
+theme_override_constants/margin_bottom = 8
-[node name="Label" type="Label" parent="CenterContainer"]
+[node name="VFlowContainer" type="VFlowContainer" parent="CenterContainer" unique_id=1522041734]
+layout_direction = 1
layout_mode = 2
-theme_override_colors/font_color = Color(0, 0, 0, 1)
-theme_override_fonts/font = SubResource("FontVariation_qfltj")
-theme_override_font_sizes/font_size = 16
-theme_override_styles/normal = SubResource("StyleBoxEmpty_3rgop")
-text = "Server message"
+theme_override_constants/h_separation = 0
+theme_override_constants/v_separation = 0
+last_wrap_alignment = 2
diff --git a/client/gui/overlays/score.gd b/client/gui/overlays/score.gd
index f66ae559..a5207746 100644
--- a/client/gui/overlays/score.gd
+++ b/client/gui/overlays/score.gd
@@ -1,5 +1,5 @@
# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
+# Copyright (C) 2026 Hurry Curry! Contributors
#
# 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
diff --git a/client/gui/overlays/score.tscn b/client/gui/overlays/score.tscn
index fcdfb514..db3e8723 100644
--- a/client/gui/overlays/score.tscn
+++ b/client/gui/overlays/score.tscn
@@ -1,6 +1,5 @@
-[gd_scene load_steps=6 format=3 uid="uid://bpikve6wlsjfl"]
+[gd_scene format=3 uid="uid://bpikve6wlsjfl"]
-[ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://gui/resources/theme/theme.tres" id="1_4kujw"]
[ext_resource type="Script" uid="uid://mcgg3q0l03dx" path="res://gui/overlays/score.gd" id="2_kbjds"]
[ext_resource type="Texture2D" uid="uid://chxkwohi56cxx" path="res://gui/resources/shaders/paper.tres" id="3_oum5g"]
[ext_resource type="FontFile" uid="uid://bo4vh5xkpvrh1" path="res://gui/resources/fonts/font-sansita-swashed.woff2" id="3_u54fv"]
@@ -8,7 +7,7 @@
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_04ujj"]
bg_color = Color(0, 0, 0, 0)
-[node name="ScoreOverlay" type="PanelContainer"]
+[node name="ScoreOverlay" type="PanelContainer" unique_id=1846677990]
layout_direction = 2
anchors_preset = 15
anchor_right = 1.0
@@ -16,22 +15,21 @@ anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
-theme = ExtResource("1_4kujw")
theme_override_styles/panel = SubResource("StyleBoxFlat_04ujj")
script = ExtResource("2_kbjds")
-[node name="GameTime" type="Timer" parent="."]
+[node name="GameTime" type="Timer" parent="." unique_id=210885742]
wait_time = 30.0
-[node name="WarningTime" type="Timer" parent="."]
+[node name="WarningTime" type="Timer" parent="." unique_id=2123014988]
one_shot = true
-[node name="Score" type="Control" parent="."]
+[node name="Score" type="Control" parent="." unique_id=2011529559]
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 0
-[node name="Paper" type="TextureRect" parent="Score"]
+[node name="Paper" type="TextureRect" parent="Score" unique_id=1153834916]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
@@ -47,7 +45,7 @@ grow_vertical = 2
rotation = 0.0610865
texture = ExtResource("3_oum5g")
-[node name="Margin" type="MarginContainer" parent="Score/Paper"]
+[node name="Margin" type="MarginContainer" parent="Score/Paper" unique_id=1572878834]
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
@@ -58,27 +56,27 @@ grow_vertical = 0
theme_override_constants/margin_left = 10
theme_override_constants/margin_bottom = 10
-[node name="Lines" type="VBoxContainer" parent="Score/Paper/Margin"]
+[node name="Lines" type="VBoxContainer" parent="Score/Paper/Margin" unique_id=837263051]
layout_direction = 1
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 8
-[node name="Line1" type="HBoxContainer" parent="Score/Paper/Margin/Lines"]
+[node name="Line1" type="HBoxContainer" parent="Score/Paper/Margin/Lines" unique_id=994156258]
layout_mode = 2
-[node name="Label" type="Label" parent="Score/Paper/Margin/Lines/Line1"]
+[node name="Label" type="Label" parent="Score/Paper/Margin/Lines/Line1" unique_id=1286515503]
layout_mode = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_fonts/font = ExtResource("3_u54fv")
theme_override_font_sizes/font_size = 25
-text = "c.score.completed"
+text = "c.score.demands_completed"
-[node name="Spacer" type="Control" parent="Score/Paper/Margin/Lines/Line1"]
+[node name="Spacer" type="Control" parent="Score/Paper/Margin/Lines/Line1" unique_id=1404497590]
layout_mode = 2
size_flags_horizontal = 3
-[node name="Completed" type="Label" parent="Score/Paper/Margin/Lines/Line1"]
+[node name="Completed" type="Label" parent="Score/Paper/Margin/Lines/Line1" unique_id=1103013403]
auto_translate_mode = 2
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
@@ -88,21 +86,21 @@ theme_override_font_sizes/font_size = 35
text = "0"
horizontal_alignment = 1
-[node name="Line2" type="HBoxContainer" parent="Score/Paper/Margin/Lines"]
+[node name="Line2" type="HBoxContainer" parent="Score/Paper/Margin/Lines" unique_id=1837168386]
layout_mode = 2
-[node name="Label" type="Label" parent="Score/Paper/Margin/Lines/Line2"]
+[node name="Label" type="Label" parent="Score/Paper/Margin/Lines/Line2" unique_id=655498209]
layout_mode = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_fonts/font = ExtResource("3_u54fv")
theme_override_font_sizes/font_size = 25
-text = "c.score.failed"
+text = "c.score.demands_failed"
-[node name="Spacer" type="Control" parent="Score/Paper/Margin/Lines/Line2"]
+[node name="Spacer" type="Control" parent="Score/Paper/Margin/Lines/Line2" unique_id=1118920525]
layout_mode = 2
size_flags_horizontal = 3
-[node name="Failed" type="Label" parent="Score/Paper/Margin/Lines/Line2"]
+[node name="Failed" type="Label" parent="Score/Paper/Margin/Lines/Line2" unique_id=820452433]
auto_translate_mode = 2
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
@@ -112,21 +110,21 @@ theme_override_font_sizes/font_size = 35
text = "0"
horizontal_alignment = 1
-[node name="Line3" type="HBoxContainer" parent="Score/Paper/Margin/Lines"]
+[node name="Line3" type="HBoxContainer" parent="Score/Paper/Margin/Lines" unique_id=395828137]
layout_mode = 2
-[node name="Label" type="Label" parent="Score/Paper/Margin/Lines/Line3"]
+[node name="Label" type="Label" parent="Score/Paper/Margin/Lines/Line3" unique_id=692176995]
layout_mode = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_fonts/font = ExtResource("3_u54fv")
theme_override_font_sizes/font_size = 35
text = "c.score.points"
-[node name="Spacer" type="Control" parent="Score/Paper/Margin/Lines/Line3"]
+[node name="Spacer" type="Control" parent="Score/Paper/Margin/Lines/Line3" unique_id=1198568818]
layout_mode = 2
size_flags_horizontal = 3
-[node name="Points" type="Label" parent="Score/Paper/Margin/Lines/Line3"]
+[node name="Points" type="Label" parent="Score/Paper/Margin/Lines/Line3" unique_id=1181984380]
auto_translate_mode = 2
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
@@ -136,12 +134,12 @@ theme_override_font_sizes/font_size = 45
text = "0"
horizontal_alignment = 1
-[node name="Time" type="Control" parent="."]
+[node name="Time" type="Control" parent="." unique_id=374078299]
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 8
-[node name="Paper" type="TextureRect" parent="Time"]
+[node name="Paper" type="TextureRect" parent="Time" unique_id=594422819]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
@@ -157,17 +155,17 @@ grow_vertical = 2
rotation = 0.0610865
texture = ExtResource("3_oum5g")
-[node name="Node2D" type="Node2D" parent="Time/Paper"]
+[node name="Node2D" type="Node2D" parent="Time/Paper" unique_id=1716596348]
position = Vector2(95, 30)
-[node name="Line" type="HBoxContainer" parent="Time/Paper/Node2D"]
+[node name="Line" type="HBoxContainer" parent="Time/Paper/Node2D" unique_id=1351708448]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
-[node name="Minutes" type="Label" parent="Time/Paper/Node2D/Line"]
+[node name="Minutes" type="Label" parent="Time/Paper/Node2D/Line" unique_id=1901555605]
auto_translate_mode = 2
layout_mode = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
@@ -176,7 +174,7 @@ theme_override_font_sizes/font_size = 45
text = "05"
horizontal_alignment = 2
-[node name="Colon" type="Label" parent="Time/Paper/Node2D/Line"]
+[node name="Colon" type="Label" parent="Time/Paper/Node2D/Line" unique_id=2075984843]
auto_translate_mode = 2
layout_mode = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
@@ -185,7 +183,7 @@ theme_override_font_sizes/font_size = 45
text = ":"
horizontal_alignment = 1
-[node name="Seconds" type="Label" parent="Time/Paper/Node2D/Line"]
+[node name="Seconds" type="Label" parent="Time/Paper/Node2D/Line" unique_id=1543571528]
auto_translate_mode = 2
layout_mode = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
@@ -193,7 +191,7 @@ theme_override_fonts/font = ExtResource("3_u54fv")
theme_override_font_sizes/font_size = 45
text = "00"
-[node name="PulsatingTime" type="Timer" parent="Time/Paper/Node2D/Line"]
+[node name="PulsatingTime" type="Timer" parent="Time/Paper/Node2D/Line" unique_id=660955497]
wait_time = 0.5
[connection signal="timeout" from="WarningTime" to="." method="_on_warning_time_timeout"]