Система диалогов.

This commit is contained in:
Евгений Титаренко 2024-08-19 18:06:14 +03:00
parent 3c1619ee9f
commit 2a2399dc2c
8 changed files with 264 additions and 88 deletions

View file

@ -1,9 +1,10 @@
[gd_scene load_steps=13 format=3 uid="uid://dfdsnwub212o6"]
[gd_scene load_steps=14 format=3 uid="uid://dfdsnwub212o6"]
[ext_resource type="Script" path="res://scripts/Player.cs" id="1_68nsf"]
[ext_resource type="SpriteFrames" uid="uid://e8ybb7seykdx" path="res://resources/sprites/player/player.tres" id="1_be2ex"]
[ext_resource type="FontFile" uid="uid://dwn20pw40jpxm" path="res://fonts/ZxSpectrum7-nROZ0.ttf" id="3_w5ojp"]
[ext_resource type="PackedScene" uid="uid://cmn7af4dsj8v2" path="res://prefabs/Dialog.tscn" id="4_owmws"]
[ext_resource type="Script" path="res://scripts/ChatLogContainer.cs" id="4_tbl72"]
[ext_resource type="PackedScene" uid="uid://phjermaw6phb" path="res://prefabs/AudioCollection.tscn" id="5_wnylg"]
[ext_resource type="AudioStream" uid="uid://cb0344er3onkq" path="res://resources/sounds/door/doorOpen_1.ogg" id="7_2fkyu"]
[ext_resource type="AudioStream" uid="uid://87caolv1uksk" path="res://resources/sounds/door/doorClose_3.ogg" id="8_4v0xv"]
@ -41,26 +42,76 @@ shape = SubResource("RectangleShape2D_sed4o")
offset = Vector2(0, -20)
zoom = Vector2(2, 2)
[node name="ChatLog" type="PanelContainer" parent="Camera2D"]
[node name="Control" type="Control" parent="Camera2D"]
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
theme = SubResource("Theme_8jldp")
[node name="ChatLog" type="PanelContainer" parent="Camera2D/Control"]
layout_mode = 0
offset_left = 160.0
offset_top = -140.0
offset_right = 276.0
offset_right = 256.0
offset_bottom = 100.0
theme = SubResource("Theme_8jldp")
theme_override_styles/panel = SubResource("StyleBoxFlat_l7l8c")
[node name="HFlowContainer" type="VBoxContainer" parent="Camera2D/ChatLog"]
[node name="PanelContainer" type="PanelContainer" parent="Camera2D/Control"]
layout_mode = 0
offset_left = 160.0
offset_top = -140.0
offset_right = 256.0
offset_bottom = -130.0
theme_override_styles/panel = SubResource("StyleBoxFlat_l7l8c")
[node name="Label" type="Label" parent="Camera2D/Control/PanelContainer"]
layout_mode = 2
text = "Chat Log"
[node name="ChatLogContainer" type="VBoxContainer" parent="Camera2D/Control"]
layout_mode = 2
offset_left = 160.0
offset_top = -130.0
offset_right = 256.0
offset_bottom = -56.0
theme_override_constants/separation = 0
script = ExtResource("4_tbl72")
[node name="PlaceholderDialog" parent="Camera2D/Control/ChatLogContainer" instance=ExtResource("4_owmws")]
visible = false
layout_mode = 2
[node name="Label" type="Label" parent="Camera2D/ChatLog/HFlowContainer"]
[node name="PlaceholderDialog2" parent="Camera2D/Control/ChatLogContainer" instance=ExtResource("4_owmws")]
visible = false
layout_mode = 2
text = "Chat"
Text = "Placeholder text 2"
Author = "NPC name 2"
[node name="Dialog" parent="Camera2D/ChatLog/HFlowContainer" instance=ExtResource("4_owmws")]
[node name="CloseLabel" type="PanelContainer" parent="Camera2D/Control"]
layout_mode = 2
offset_left = 160.0
offset_top = 90.0
offset_right = 256.0
offset_bottom = 100.0
theme_override_styles/panel = SubResource("StyleBoxFlat_l7l8c")
[node name="Dialog2" parent="Camera2D/ChatLog/HFlowContainer" instance=ExtResource("4_owmws")]
[node name="Label" type="Label" parent="Camera2D/Control/CloseLabel"]
layout_mode = 2
text = "C - Exit"
[node name="NextLabel" type="PanelContainer" parent="Camera2D/Control"]
layout_mode = 2
offset_left = 160.0
offset_top = 90.0
offset_right = 256.0
offset_bottom = 100.0
theme_override_styles/panel = SubResource("StyleBoxFlat_l7l8c")
[node name="Label" type="Label" parent="Camera2D/Control/NextLabel"]
layout_mode = 2
text = "E - Next"
[node name="Footsteps" parent="." instance=ExtResource("5_wnylg")]
RandomPitch = true