diff --git a/DungeonShooting_Godot/prefab/ui/Encyclopedia.tscn b/DungeonShooting_Godot/prefab/ui/Encyclopedia.tscn index ae95d6a..3a8adcc 100644 --- a/DungeonShooting_Godot/prefab/ui/Encyclopedia.tscn +++ b/DungeonShooting_Godot/prefab/ui/Encyclopedia.tscn @@ -1,13 +1,12 @@ -[gd_scene load_steps=10 format=3 uid="uid://b2xq02i3vxct"] +[gd_scene load_steps=9 format=3 uid="uid://b2xq02i3vxct"] [ext_resource type="Script" path="res://src/game/ui/encyclopedia/EncyclopediaPanel.cs" id="1_hd86y"] [ext_resource type="Texture2D" uid="uid://c0st2iiql8igg" path="res://resource/sprite/ui/encyclopedia/TitleBg.png" id="3_gdtik"] [ext_resource type="Shader" path="res://resource/material/Blend.gdshader" id="3_o1xl7"] [ext_resource type="Texture2D" uid="uid://brevrlfdtllmk" path="res://resource/sprite/ui/encyclopedia/Select.png" id="5_f0anf"] [ext_resource type="Texture2D" uid="uid://cu5y32wfai4pn" path="res://resource/sprite/ui/encyclopedia/Item.png" id="5_niceh"] -[ext_resource type="Texture2D" uid="uid://5adiy3ycqyxw" path="res://resource/sprite/ui/GUI.png" id="5_qcyvs"] -[ext_resource type="Texture2D" uid="uid://civvcowt2wklr" path="res://resource/sprite/weapon/weapon0001/Weapon0001.png" id="6_536pn"] [ext_resource type="Texture2D" uid="uid://conjg6fw6670x" path="res://resource/sprite/ui/encyclopedia/Panel.png" id="7_hfdat"] +[ext_resource type="Material" uid="uid://j8t31iuumvhr" path="res://resource/material/Outline.tres" id="7_yd5ks"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_gm0bl"] resource_local_to_scene = true @@ -26,11 +25,8 @@ anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -offset_right = -1440.0 -offset_bottom = -810.0 grow_horizontal = 2 grow_vertical = 2 -scale = Vector2(4, 4) script = ExtResource("1_hd86y") [node name="ColorRect" type="ColorRect" parent="."] @@ -48,24 +44,26 @@ anchor_right = 1.0 anchor_bottom = 1.0 offset_left = 3.0 -offset_top = 12.0 +offset_top = 54.0 offset_right = -3.0 offset_bottom = -3.0 grow_horizontal = 2 grow_vertical = 2 -texture = ExtResource("5_qcyvs") -region_rect = Rect2(2, 35, 44, 43) -patch_margin_left = 30 -patch_margin_top = 29 -patch_margin_right = 30 -patch_margin_bottom = 30 +texture = ExtResource("7_hfdat") +region_rect = Rect2(0, 0, 128, 128) +patch_margin_left = 56 +patch_margin_top = 56 +patch_margin_right = 56 +patch_margin_bottom = 56 [node name="TextureRect" type="TextureRect" parent="NinePatchRect"] layout_mode = 1 anchors_preset = 10 anchor_right = 1.0 -offset_top = -10.25 -offset_bottom = 11.75 +offset_left = -3.0 +offset_top = -35.0 +offset_right = -3.0 +offset_bottom = 69.0 grow_horizontal = 2 texture = ExtResource("3_gdtik") stretch_mode = 3 @@ -75,12 +73,12 @@ anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -offset_top = -3.25 -offset_bottom = -1.25 +offset_top = -3.0 +offset_bottom = -15.0 grow_horizontal = 2 grow_vertical = 2 theme_override_colors/font_color = Color(0, 0, 0, 1) -theme_override_font_sizes/font_size = 16 +theme_override_font_sizes/font_size = 48 text = "图鉴" horizontal_alignment = 1 vertical_alignment = 1 @@ -92,10 +90,10 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -theme_override_constants/margin_left = 10 -theme_override_constants/margin_top = 20 -theme_override_constants/margin_right = 10 -theme_override_constants/margin_bottom = 10 +theme_override_constants/margin_left = 40 +theme_override_constants/margin_top = 80 +theme_override_constants/margin_right = 40 +theme_override_constants/margin_bottom = 40 [node name="HBoxContainer" type="HBoxContainer" parent="NinePatchRect/MarginContainer"] layout_mode = 2 @@ -103,26 +101,27 @@ [node name="VBoxContainer2" type="VBoxContainer" parent="NinePatchRect/MarginContainer/HBoxContainer"] layout_mode = 2 size_flags_horizontal = 3 -size_flags_stretch_ratio = 2.0 +size_flags_stretch_ratio = 3.0 [node name="NinePatchRect" type="NinePatchRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer2"] layout_mode = 2 size_flags_vertical = 3 texture = ExtResource("7_hfdat") -patch_margin_left = 14 -patch_margin_top = 14 -patch_margin_right = 14 -patch_margin_bottom = 14 +region_rect = Rect2(0, 0, 128, 128) +patch_margin_left = 56 +patch_margin_top = 56 +patch_margin_right = 56 +patch_margin_bottom = 56 [node name="ScrollContainer" type="ScrollContainer" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer2/NinePatchRect"] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -offset_left = 7.0 -offset_top = 7.0 -offset_right = -7.0 -offset_bottom = -7.0 +offset_left = 24.0 +offset_top = 24.0 +offset_right = -24.0 +offset_bottom = -24.0 grow_horizontal = 2 grow_vertical = 2 size_flags_horizontal = 3 @@ -130,7 +129,7 @@ size_flags_stretch_ratio = 75.0 [node name="ObjectButton" type="TextureButton" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer2/NinePatchRect/ScrollContainer"] -custom_minimum_size = Vector2(50, 30) +custom_minimum_size = Vector2(200, 120) layout_mode = 2 [node name="Bg" type="NinePatchRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer2/NinePatchRect/ScrollContainer/ObjectButton"] @@ -141,10 +140,11 @@ grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("5_niceh") -patch_margin_left = 8 -patch_margin_top = 8 -patch_margin_right = 8 -patch_margin_bottom = 8 +region_rect = Rect2(0, 0, 56, 56) +patch_margin_left = 24 +patch_margin_top = 24 +patch_margin_right = 24 +patch_margin_bottom = 24 [node name="PreviewImage" type="TextureRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer2/NinePatchRect/ScrollContainer/ObjectButton"] material = SubResource("ShaderMaterial_gm0bl") @@ -152,8 +152,11 @@ anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 +offset_right = -150.0 +offset_bottom = -90.0 grow_horizontal = 2 grow_vertical = 2 +scale = Vector2(4, 4) mouse_filter = 2 stretch_mode = 3 @@ -165,43 +168,69 @@ grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("5_f0anf") -region_rect = Rect2(0, 0, 4, 4) -patch_margin_left = 3 -patch_margin_top = 3 -patch_margin_right = 3 -patch_margin_bottom = 3 +region_rect = Rect2(0, 0, 16, 16) +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 4 [node name="VBoxContainer3" type="VBoxContainer" parent="NinePatchRect/MarginContainer/HBoxContainer"] +custom_minimum_size = Vector2(452, 2.08165e-12) layout_mode = 2 -size_flags_horizontal = 3 [node name="NinePatchRect" type="NinePatchRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3"] layout_mode = 2 size_flags_vertical = 3 texture = ExtResource("7_hfdat") -patch_margin_left = 14 -patch_margin_top = 14 -patch_margin_right = 14 -patch_margin_bottom = 14 +patch_margin_left = 56 +patch_margin_top = 56 +patch_margin_right = 56 +patch_margin_bottom = 56 [node name="VBoxContainer" type="VBoxContainer" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect"] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -offset_left = 7.0 -offset_top = 7.0 -offset_right = -7.0 -offset_bottom = -7.0 +offset_left = 20.0 +offset_top = 20.0 +offset_right = -20.0 +offset_bottom = -20.0 grow_horizontal = 2 grow_vertical = 2 +theme_override_constants/separation = 16 -[node name="TextureRect" type="TextureRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect/VBoxContainer"] +[node name="Label" type="Label" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect/VBoxContainer"] layout_mode = 2 +text = "名称" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="NinePatchRect" type="NinePatchRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect/VBoxContainer"] +custom_minimum_size = Vector2(396, 320) +layout_mode = 2 +texture = ExtResource("7_hfdat") +patch_margin_left = 56 +patch_margin_top = 56 +patch_margin_right = 56 +patch_margin_bottom = 56 + +[node name="TextureRect" type="TextureRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect/VBoxContainer/NinePatchRect"] +material = ExtResource("7_yd5ks") +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 5.0 +offset_top = 5.0 +offset_right = -4.0 +offset_bottom = -5.0 +grow_horizontal = 2 +grow_vertical = 2 size_flags_vertical = 3 -texture = ExtResource("6_536pn") stretch_mode = 3 -[node name="Gui" type="Sprite2D" parent="."] -position = Vector2(-108.25, 158.25) -texture = ExtResource("5_qcyvs") +[node name="RichTextLabel" type="RichTextLabel" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 +text = "文本描述" diff --git a/DungeonShooting_Godot/resource/font/VonwaonBitmap-12px.ttf.import b/DungeonShooting_Godot/resource/font/VonwaonBitmap-12px.ttf.import index 5bf5d21..c3c5a68 100644 --- a/DungeonShooting_Godot/resource/font/VonwaonBitmap-12px.ttf.import +++ b/DungeonShooting_Godot/resource/font/VonwaonBitmap-12px.ttf.import @@ -13,7 +13,7 @@ [params] Rendering=null -antialiasing=1 +antialiasing=0 generate_mipmaps=false multichannel_signed_distance_field=false msdf_pixel_range=8 @@ -27,7 +27,12 @@ fallbacks=[] Compress=null compress=true -preload=[] +preload=[{ +"chars": [], +"glyphs": [], +"name": "新建配置", +"size": Vector2i(16, 0) +}] language_support={} script_support={} opentype_features={} diff --git a/DungeonShooting_Godot/resource/font/VonwaonBitmap-16px.ttf.import b/DungeonShooting_Godot/resource/font/VonwaonBitmap-16px.ttf.import index 4c35ce8..edce16b 100644 --- a/DungeonShooting_Godot/resource/font/VonwaonBitmap-16px.ttf.import +++ b/DungeonShooting_Godot/resource/font/VonwaonBitmap-16px.ttf.import @@ -13,7 +13,7 @@ [params] Rendering=null -antialiasing=1 +antialiasing=0 generate_mipmaps=false multichannel_signed_distance_field=false msdf_pixel_range=8 @@ -27,7 +27,12 @@ fallbacks=[] Compress=null compress=true -preload=[] +preload=[{ +"chars": [], +"glyphs": [], +"name": "新建配置", +"size": Vector2i(16, 0) +}] language_support={} script_support={} opentype_features={} diff --git a/DungeonShooting_Godot/resource/material/Outline.tres b/DungeonShooting_Godot/resource/material/Outline.tres index c789b00..20a502c 100644 --- a/DungeonShooting_Godot/resource/material/Outline.tres +++ b/DungeonShooting_Godot/resource/material/Outline.tres @@ -5,4 +5,4 @@ [resource] resource_local_to_scene = true shader = ExtResource("1_neih8") -shader_parameter/outline_color = Color(0, 0, 0, 1) +shader_parameter/outline_color = Color(1, 1, 1, 1) diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Item.png b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Item.png index de6b323..cc63c50 100644 --- a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Item.png +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Item.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Panel.png b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Panel.png index 1dc781c..2ac81c0 100644 --- a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Panel.png +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Panel.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Select.png b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Select.png index 8b81902..f915722 100644 --- a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Select.png +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Select.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TitleBg.png b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TitleBg.png index 45a7651..c2eefd5 100644 --- a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TitleBg.png +++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/TitleBg.png Binary files differ diff --git a/DungeonShooting_Godot/src/game/ui/encyclopedia/Encyclopedia.cs b/DungeonShooting_Godot/src/game/ui/encyclopedia/Encyclopedia.cs index f3f086c..0130536 100644 --- a/DungeonShooting_Godot/src/game/ui/encyclopedia/Encyclopedia.cs +++ b/DungeonShooting_Godot/src/game/ui/encyclopedia/Encyclopedia.cs @@ -31,19 +31,6 @@ } private NinePatchRect _L_NinePatchRect; - /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.Gui - /// - public Gui L_Gui - { - get - { - if (_L_Gui == null) _L_Gui = new Gui((EncyclopediaPanel)this, GetNode("Gui")); - return _L_Gui; - } - } - private Gui _L_Gui; - public Encyclopedia() : base(nameof(Encyclopedia)) { @@ -236,7 +223,16 @@ } /// - /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.TextureRect + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.Label + /// + public class Label_1 : UiNode + { + public Label_1(EncyclopediaPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Label_1 Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.NinePatchRect.TextureRect /// public class TextureRect_1 : UiNode { @@ -245,12 +241,12 @@ } /// - /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.NinePatchRect /// - public class VBoxContainer : UiNode + public class NinePatchRect_3 : UiNode { /// - /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.TextureRect + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.TextureRect /// public TextureRect_1 L_TextureRect { @@ -262,6 +258,63 @@ } private TextureRect_1 _L_TextureRect; + public NinePatchRect_3(EncyclopediaPanel uiPanel, Godot.NinePatchRect node) : base(uiPanel, node) { } + public override NinePatchRect_3 Clone() => new (UiPanel, (Godot.NinePatchRect)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.RichTextLabel + /// + public class RichTextLabel : UiNode + { + public RichTextLabel(EncyclopediaPanel uiPanel, Godot.RichTextLabel node) : base(uiPanel, node) { } + public override RichTextLabel Clone() => new (UiPanel, (Godot.RichTextLabel)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer + /// + public class VBoxContainer : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.Label + /// + public Label_1 L_Label + { + get + { + if (_L_Label == null) _L_Label = new Label_1(UiPanel, Instance.GetNode("Label")); + return _L_Label; + } + } + private Label_1 _L_Label; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.NinePatchRect + /// + public NinePatchRect_3 L_NinePatchRect + { + get + { + if (_L_NinePatchRect == null) _L_NinePatchRect = new NinePatchRect_3(UiPanel, Instance.GetNode("NinePatchRect")); + return _L_NinePatchRect; + } + } + private NinePatchRect_3 _L_NinePatchRect; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.RichTextLabel + /// + public RichTextLabel L_RichTextLabel + { + get + { + if (_L_RichTextLabel == null) _L_RichTextLabel = new RichTextLabel(UiPanel, Instance.GetNode("RichTextLabel")); + return _L_RichTextLabel; + } + } + private RichTextLabel _L_RichTextLabel; + public VBoxContainer(EncyclopediaPanel uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { } public override VBoxContainer Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate()); } @@ -402,15 +455,6 @@ public override NinePatchRect Clone() => new (UiPanel, (Godot.NinePatchRect)Instance.Duplicate()); } - /// - /// 类型: , 路径: Encyclopedia.Gui - /// - public class Gui : UiNode - { - public Gui(EncyclopediaPanel uiPanel, Godot.Sprite2D node) : base(uiPanel, node) { } - public override Gui Clone() => new (UiPanel, (Godot.Sprite2D)Instance.Duplicate()); - } - /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.ColorRect @@ -418,11 +462,6 @@ public ColorRect S_ColorRect => L_ColorRect; /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.TextureRect.Label - /// - public Label S_Label => L_NinePatchRect.L_TextureRect.L_Label; - - /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.NinePatchRect.ScrollContainer.ObjectButton.Bg /// public Bg S_Bg => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer2.L_NinePatchRect.L_ScrollContainer.L_ObjectButton.L_Bg; @@ -453,6 +492,11 @@ public VBoxContainer2 S_VBoxContainer2 => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer2; /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.RichTextLabel + /// + public RichTextLabel S_RichTextLabel => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer3.L_NinePatchRect.L_VBoxContainer.L_RichTextLabel; + + /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer /// public VBoxContainer S_VBoxContainer => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer3.L_NinePatchRect.L_VBoxContainer; @@ -472,9 +516,4 @@ /// public MarginContainer S_MarginContainer => L_NinePatchRect.L_MarginContainer; - /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.Gui - /// - public Gui S_Gui => L_Gui; - }