feat: add exact player context actions

This commit is contained in:
Rijad Zuzo
2026-07-30 23:27:46 +02:00
parent d950c3da68
commit 7d410d8193
12 changed files with 762 additions and 67 deletions
+66
View File
@@ -13,6 +13,7 @@
[ext_resource type="Script" uid="uid://bivrsk5ukgnoo" path="res://world/demo/DemoController.gd" id="13_demo"]
[ext_resource type="PackedScene" path="res://player/PlayerVisual.tscn" id="14_player_visual"]
[ext_resource type="Script" uid="uid://dwwxux24jc6yq" path="res://world/ui/village_whisper_hud.gd" id="15_whisper"]
[ext_resource type="Script" path="res://world/ui/player_interaction_hud.gd" id="16_interaction"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_o5qli"]
radius = 0.4
@@ -127,6 +128,71 @@ offset_right = 940.0
offset_bottom = 66.0
script = ExtResource("12_timedial")
[node name="PlayerInteractionLayer" type="CanvasLayer" parent="."]
layer = 2
[node name="PlayerInteractionHud" type="Control" parent="PlayerInteractionLayer" node_paths=PackedStringArray("player", "simulation_manager")]
visible = false
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -290.0
offset_top = -108.0
offset_right = 290.0
offset_bottom = -42.0
grow_horizontal = 2
grow_vertical = 0
mouse_filter = 2
script = ExtResource("16_interaction")
player = NodePath("../../Player")
simulation_manager = NodePath("../../SimulationManager")
[node name="Accent" type="ColorRect" parent="PlayerInteractionLayer/PlayerInteractionHud"]
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
offset_bottom = 2.0
grow_horizontal = 2
mouse_filter = 2
color = Color(0.9, 0.63, 0.28, 0.95)
[node name="Copy" type="VBoxContainer" parent="PlayerInteractionLayer/PlayerInteractionHud"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = 8.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
theme_override_constants/separation = 2
alignment = 1
[node name="Action" type="Label" parent="PlayerInteractionLayer/PlayerInteractionHud/Copy"]
layout_mode = 2
mouse_filter = 2
theme_override_colors/font_color = Color(0.98, 0.92, 0.79, 1)
theme_override_colors/font_outline_color = Color(0.07, 0.045, 0.025, 0.94)
theme_override_colors/font_shadow_color = Color(0.02, 0.01, 0.005, 0.7)
theme_override_constants/outline_size = 7
theme_override_constants/shadow_offset_x = 1
theme_override_constants/shadow_offset_y = 2
theme_override_font_sizes/font_size = 20
text = "E · Interact"
horizontal_alignment = 1
[node name="Detail" type="Label" parent="PlayerInteractionLayer/PlayerInteractionHud/Copy"]
layout_mode = 2
mouse_filter = 2
theme_override_colors/font_color = Color(0.85, 0.77, 0.64, 1)
theme_override_colors/font_outline_color = Color(0.07, 0.045, 0.025, 0.9)
theme_override_constants/outline_size = 5
theme_override_font_sizes/font_size = 13
text = "Context"
horizontal_alignment = 1
[node name="VillageWhisperLayer" type="CanvasLayer" parent="."]
layer = 3