Интерфейс для диалогов

This commit is contained in:
Евгений Титаренко 2024-08-24 19:53:51 +03:00
parent 7afef58a7f
commit 65003d3030
10 changed files with 288 additions and 49 deletions

View file

@ -1,32 +1,38 @@
[gd_scene load_steps=8 format=3 uid="uid://cmn7af4dsj8v2"]
[gd_scene load_steps=9 format=3 uid="uid://cmn7af4dsj8v2"]
[ext_resource type="FontFile" uid="uid://dwn20pw40jpxm" path="res://fonts/ZxSpectrum7-nROZ0.ttf" id="1_e4s1h"]
[ext_resource type="Script" path="res://scripts/Dialog.cs" id="2_a35aq"]
[ext_resource type="Texture2D" uid="uid://b7dgjrmfqi162" path="res://resources/sprites/ui/panel_square.png" id="3_adx38"]
[sub_resource type="Theme" id="Theme_gtdw8"]
default_font = ExtResource("1_e4s1h")
default_font_size = 10
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tctyf"]
bg_color = Color(0.532017, 0.646565, 0.382003, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yovy8"]
bg_color = Color(0.704854, 0.51027, 0.802981, 1)
[sub_resource type="LabelSettings" id="LabelSettings_8nvov"]
font = ExtResource("1_e4s1h")
font_size = 10
outline_color = Color(0, 0, 0, 1)
bg_color = Color(0.533333, 0.647059, 0.380392, 0)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dk342"]
bg_color = Color(0.906641, 0.460702, 0.0359737, 1)
content_margin_top = 4.0
bg_color = Color(0.905882, 0.458824, 0.0352941, 0)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yovy8"]
bg_color = Color(0.6, 0.6, 0.6, 0)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_68mln"]
content_margin_left = 5.0
content_margin_top = 5.0
content_margin_right = 5.0
content_margin_bottom = 5.0
bg_color = Color(0.6, 0.6, 0.6, 0)
[node name="Dialog" type="PanelContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = -544.0
offset_bottom = -443.0
offset_left = -10.5
offset_top = -5.0
offset_right = -550.5
offset_bottom = -438.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
@ -36,17 +42,7 @@ script = ExtResource("2_a35aq")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 2
[node name="PanelContainer" type="PanelContainer" parent="VBoxContainer"]
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_yovy8")
[node name="TextBox" type="Label" parent="VBoxContainer/PanelContainer"]
custom_minimum_size = Vector2(96, 10)
layout_mode = 2
text = "Placeholder text"
label_settings = SubResource("LabelSettings_8nvov")
autowrap_mode = 3
theme_override_constants/separation = 0
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
layout_mode = 2
@ -57,9 +53,28 @@ layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_dk342")
[node name="AuthorBox" type="Label" parent="VBoxContainer/HBoxContainer/PanelContainer"]
custom_minimum_size = Vector2(96, 10)
custom_minimum_size = Vector2(100, 10)
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 0
text = "NPC name"
autowrap_mode = 3
[node name="PanelContainer" type="PanelContainer" parent="VBoxContainer"]
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_yovy8")
[node name="NinePatchRect" type="NinePatchRect" parent="VBoxContainer/PanelContainer"]
layout_mode = 2
texture = ExtResource("3_adx38")
patch_margin_left = 12
patch_margin_top = 14
patch_margin_right = 12
patch_margin_bottom = 12
[node name="TextBox" type="Label" parent="VBoxContainer/PanelContainer"]
custom_minimum_size = Vector2(90, 10)
layout_mode = 2
theme_override_styles/normal = SubResource("StyleBoxFlat_68mln")
text = "Placeholder text"
autowrap_mode = 3