From 524524668a7d57db769ace997c4f9c4f2772e703 Mon Sep 17 00:00:00 2001 From: TheRedTanuki Date: Thu, 9 Jul 2026 18:45:55 +0200 Subject: [PATCH 01/47] Minor UI modifications Updated buttons on settings in Lobby Updated style in PauseMenu --- Scenes/Lobby/Lobby.tscn | 9 ++-- Scenes/PauseMenu/PauseMenu.tscn | 74 +++++++++++++++++++++++++++------ 2 files changed, 65 insertions(+), 18 deletions(-) diff --git a/Scenes/Lobby/Lobby.tscn b/Scenes/Lobby/Lobby.tscn index 4c1a9a9b..f71e1173 100644 --- a/Scenes/Lobby/Lobby.tscn +++ b/Scenes/Lobby/Lobby.tscn @@ -71,7 +71,6 @@ font_size = 25 [node name="Lobby" type="Node3D" unique_id=1575583449] script = ExtResource("1_vmtcs") playerCard = ExtResource("7_e46jn") -presentationScenePaths = PackedStringArray("res://Scenes/Lobby/Restaurant_presentation.tscn", "res://Scenes/Lobby/Dungeon_presentation.tscn") [node name="Countdown" type="Node" parent="." unique_id=564553342 node_paths=PackedStringArray("label")] script = ExtResource("3_lj1ok") @@ -404,10 +403,10 @@ flat = true [node name="Minus" type="MarginContainer" parent="UI/HBox/Others/Settings/Margin/VBox/Hunter Selection/HBox/Input/Buttons" unique_id=526128786] layout_mode = 2 script = ExtResource("5_ew8go") -BezelSize = 0 +BezelSize = 6 Color = Color(0.38431373, 0.34901962, 0.4862745, 1) -TopLeft = true -BottomRight = true +TopRight = false +BottomLeft = false [node name="Margin" type="MarginContainer" parent="UI/HBox/Others/Settings/Margin/VBox/Hunter Selection/HBox/Input/Buttons/Minus" unique_id=1494505269] layout_mode = 2 @@ -621,8 +620,6 @@ flat = true [connection signal="pressed" from="UI/HBox/Others/Settings/Margin/VBox/Hunter Selection/HBox/Input/Buttons/Plus/Button" to="." method="IncreaseHunterCount"] [connection signal="pressed" from="UI/HBox/Others/Settings/Margin/VBox/Hunter Selection/HBox/Input/Buttons/Minus/Button" to="." method="DecreaseHunterCount"] -[connection signal="pressed" from="UI/HBox/Others/Settings/Margin/VBox/Map Selection/HBox/Input/Pervious/Button" to="." method="ChangeMap" binds= [-1]] -[connection signal="pressed" from="UI/HBox/Others/Settings/Margin/VBox/Map Selection/HBox/Input/Next/Button" to="." method="ChangeMap" binds= [1]] [connection signal="pressed" from="UI/HBox/Others/Buttons/Role/Button" to="." method="RoleButtonPressed"] [connection signal="pressed" from="UI/HBox/Others/Buttons/Ready/Button" to="." method="ReadyButtonPressed"] [connection signal="pressed" from="UI/HBox/Others/Buttons/Quit/Button" to="." method="QuitButtonPressed"] diff --git a/Scenes/PauseMenu/PauseMenu.tscn b/Scenes/PauseMenu/PauseMenu.tscn index 2b39744b..79594fb1 100644 --- a/Scenes/PauseMenu/PauseMenu.tscn +++ b/Scenes/PauseMenu/PauseMenu.tscn @@ -3,6 +3,8 @@ [ext_resource type="Script" uid="uid://bccs3yyeq7del" path="res://Scenes/PauseMenu/PauseMenu.cs" id="1_vd4nb"] [ext_resource type="PackedScene" uid="uid://mvi6mhwtencn" path="res://Scenes/Settings/Settings.tscn" id="2_jpxof"] [ext_resource type="Shader" uid="uid://baf1p55idhp1q" path="res://Scenes/PauseMenu/blur.gdshader" id="2_qu44q"] +[ext_resource type="Script" uid="uid://b287r2c48ldja" path="res://Prefabs/Controls/BezelContainer.cs" id="3_82qyg"] +[ext_resource type="Script" uid="uid://cwnjmwom5p2f4" path="res://Prefabs/Controls/StyleBoxBevel.cs" id="4_ifvnd"] [sub_resource type="Shader" id="Shader_4bayv"] code = "shader_type canvas_item; @@ -87,12 +89,19 @@ shader_parameter/u_blur_intensity = 1.2 shader = ExtResource("2_qu44q") shader_parameter/lod = 4.00000019 -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_82qyg"] -bg_color = Color(11.708403, 11.708403, 11.708403, 1) -corner_radius_top_left = 10 -corner_radius_top_right = 10 -corner_radius_bottom_right = 10 -corner_radius_bottom_left = 10 +[sub_resource type="StyleBox" id="StyleBox_lj1ok"] +resource_local_to_scene = false +resource_name = "" +content_margin_left = -1.0 +content_margin_top = -1.0 +content_margin_right = -1.0 +content_margin_bottom = -1.0 +script = ExtResource("4_ifvnd") +BevelSize = 22 +Color = Color(1, 1, 1, 1) +metadata/_custom_type_script = "uid://cwnjmwom5p2f4" + +[sub_resource type="LabelSettings" id="LabelSettings_w1hta"] [node name="Pause Menu" type="Control" unique_id=1490677513] z_index = 10 @@ -110,13 +119,15 @@ layout_mode = 1 anchors_preset = -1 anchor_left = 0.35 anchor_top = 0.2 -anchor_right = 0.64 +anchor_right = 0.65 anchor_bottom = 0.2 +offset_right = -0.00012207031 +offset_bottom = 136.0 [node name="Background" type="Panel" parent="Pause Menu" unique_id=100627987] material = SubResource("ShaderMaterial_4bayv") layout_mode = 2 -theme_override_styles/panel = SubResource("StyleBoxFlat_82qyg") +theme_override_styles/panel = SubResource("StyleBox_lj1ok") [node name="MarginContainer" type="MarginContainer" parent="Pause Menu" unique_id=1814557344] layout_mode = 2 @@ -128,21 +139,59 @@ theme_override_constants/margin_bottom = 20 [node name="Buttons" type="VBoxContainer" parent="Pause Menu/MarginContainer" unique_id=107834565] layout_mode = 2 +theme_override_constants/separation = 10 + +[node name="SettingsContainer" type="MarginContainer" parent="Pause Menu/MarginContainer/Buttons" unique_id=2043576730] +layout_mode = 2 +theme_override_constants/margin_top = 10 +theme_override_constants/margin_bottom = 10 +script = ExtResource("3_82qyg") +BezelSize = 15 +Color = Color(0.039215688, 0.15686275, 0.32941177, 1) -[node name="Settings" type="Button" parent="Pause Menu/MarginContainer/Buttons" unique_id=1823169428] +[node name="MarginContainer" type="MarginContainer" parent="Pause Menu/MarginContainer/Buttons/SettingsContainer" unique_id=619183107] +layout_mode = 2 + +[node name="Label" type="Label" parent="Pause Menu/MarginContainer/Buttons/SettingsContainer/MarginContainer" unique_id=1526470535] layout_mode = 2 text = "Settings" +label_settings = SubResource("LabelSettings_w1hta") +horizontal_alignment = 1 +vertical_alignment = 1 +uppercase = true + +[node name="Settings" type="Button" parent="Pause Menu/MarginContainer/Buttons/SettingsContainer" unique_id=1823169428] +layout_mode = 2 +flat = true -[node name="Back" type="Button" parent="Pause Menu/MarginContainer/Buttons" unique_id=1526716928] +[node name="BackContainer" type="MarginContainer" parent="Pause Menu/MarginContainer/Buttons" unique_id=1101279205] +layout_mode = 2 +theme_override_constants/margin_top = 10 +theme_override_constants/margin_bottom = 10 +script = ExtResource("3_82qyg") +BezelSize = 15 +Color = Color(0.019607844, 0.105882354, 0.20784314, 1) + +[node name="MarginContainer" type="MarginContainer" parent="Pause Menu/MarginContainer/Buttons/BackContainer" unique_id=277618591] +layout_mode = 2 + +[node name="Label" type="Label" parent="Pause Menu/MarginContainer/Buttons/BackContainer/MarginContainer" unique_id=688603231] layout_mode = 2 text = "Back" +horizontal_alignment = 1 +vertical_alignment = 1 +uppercase = true + +[node name="Back" type="Button" parent="Pause Menu/MarginContainer/Buttons/BackContainer" unique_id=1526716928] +layout_mode = 2 +flat = true [node name="Settings Menu" parent="." unique_id=1584239507 instance=ExtResource("2_jpxof")] visible = false layout_mode = 1 -[connection signal="pressed" from="Pause Menu/MarginContainer/Buttons/Settings" to="." method="SwitchToSettingsMenu"] -[connection signal="pressed" from="Pause Menu/MarginContainer/Buttons/Back" to="." method="ToggleMenu"] +[connection signal="pressed" from="Pause Menu/MarginContainer/Buttons/SettingsContainer/Settings" to="." method="SwitchToSettingsMenu"] +[connection signal="pressed" from="Pause Menu/MarginContainer/Buttons/BackContainer/Back" to="." method="ToggleMenu"] [connection signal="pressed" from="Settings Menu/TabContainer/General/VBox/Back" to="." method="ToggleMenu"] [connection signal="pressed" from="Settings Menu/TabContainer/Controls/VBox/Back" to="." method="ToggleMenu"] [connection signal="pressed" from="Settings Menu/TabContainer/Video/VBox/Back" to="." method="ToggleMenu"] @@ -154,3 +203,4 @@ layout_mode = 1 [editable path="Settings Menu/TabContainer/Controls/VBox/FOV"] [editable path="Settings Menu/TabContainer/Video/VBox/UI Scaling/Slider Setting"] [editable path="Settings Menu/TabContainer/Video/VBox/Render Scale/Slider Setting"] +[editable path="Settings Menu/TabContainer/Video/VBox/Max FPS/Slider Setting"] From 57ce19c1a30e03d3668950b52c2f825083f854c2 Mon Sep 17 00:00:00 2001 From: TheRedTanuki Date: Fri, 10 Jul 2026 12:53:54 +0200 Subject: [PATCH 02/47] New custom HealthBar --- Prefabs/Controls/Lifebar/Lifebar.tscn | 43 +++++++++++++++++++++++++++ Prefabs/Player/HunterBody.cs | 5 ++-- Prefabs/Player/PlayerBody.cs | 6 ++-- Prefabs/Player/PropBody.cs | 5 ++-- Prefabs/Player/hunter.tscn | 14 ++------- Prefabs/Player/prop.tscn | 18 ++++------- 6 files changed, 61 insertions(+), 30 deletions(-) create mode 100644 Prefabs/Controls/Lifebar/Lifebar.tscn diff --git a/Prefabs/Controls/Lifebar/Lifebar.tscn b/Prefabs/Controls/Lifebar/Lifebar.tscn new file mode 100644 index 00000000..d83fd5c1 --- /dev/null +++ b/Prefabs/Controls/Lifebar/Lifebar.tscn @@ -0,0 +1,43 @@ +[gd_scene format=3 uid="uid://nkor8n0q2s8j"] + +[ext_resource type="Script" uid="uid://b287r2c48ldja" path="res://Prefabs/Controls/BezelContainer.cs" id="1_ah5tn"] + +[node name="Lifebar" type="MarginContainer" unique_id=1371579750] +offset_right = 146.0 +offset_bottom = 40.0 +theme_override_constants/margin_left = 7 +theme_override_constants/margin_top = 7 +theme_override_constants/margin_right = 7 +theme_override_constants/margin_bottom = 7 +script = ExtResource("1_ah5tn") +BezelSize = 10 +BorderWidth = 7 + +[node name="Mask" type="MarginContainer" parent="." unique_id=1038084462] +clip_children = 1 +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +offset_transform_enabled = true +theme_override_constants/margin_left = 0 +theme_override_constants/margin_top = 0 +theme_override_constants/margin_right = 0 +theme_override_constants/margin_bottom = 0 +script = ExtResource("1_ah5tn") +BezelSize = 5 + +[node name="HealthBar" type="MarginContainer" parent="Mask" unique_id=1460984706] +layout_mode = 2 +offset_transform_enabled = true +theme_override_constants/margin_left = 7 +theme_override_constants/margin_top = 7 +theme_override_constants/margin_right = 7 +theme_override_constants/margin_bottom = 7 +script = ExtResource("1_ah5tn") +BezelSize = 5 +Color = Color(0, 0.74509805, 0, 1) + +[node name="HealthLabel" type="Label" parent="." unique_id=1266037613] +layout_mode = 2 +text = "100" +horizontal_alignment = 1 +vertical_alignment = 1 diff --git a/Prefabs/Player/HunterBody.cs b/Prefabs/Player/HunterBody.cs index 12d328a6..1a58c9fa 100644 --- a/Prefabs/Player/HunterBody.cs +++ b/Prefabs/Player/HunterBody.cs @@ -1,4 +1,5 @@ using Behide.Prefabs.Player; +using Behide.UI.Controls; using Godot; namespace Behide.Game.Player; @@ -18,8 +19,8 @@ public partial class HunterBody : PlayerBody protected override Camera3D Camera => _.Camera; protected override RayCast3D RayCast => _.Camera.RayCast; protected override Label PlayerUsername => Gun.PlayerUsernameLabel; - protected override ProgressBar HealthBar => _.HUD.Health.HealthBar; - protected override Label HealthLabel => _.HUD.Health.HealthLabel; + protected override BezelContainer HealthBar => _.HUD.Health.Border.GetNode("Mask/HealthBar"); + protected override Label HealthLabel => _.HUD.Health.Border.GetNode