制作图鉴

This commit is contained in:
小李xl 2024-03-12 10:16:56 +08:00
parent d80ccb4681
commit c791afce15
9 changed files with 174 additions and 96 deletions

View File

@ -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 @@ layout_mode = 3
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 @@ anchors_preset = 15
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 @@ layout_mode = 1
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_right = 1.0
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 @@ layout_mode = 2
[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_vertical = 3
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 @@ anchor_bottom = 1.0
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 @@ layout_mode = 1
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 @@ anchor_bottom = 1.0
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 = "文本描述"

View File

@ -13,7 +13,7 @@ dest_files=["res://.godot/imported/VonwaonBitmap-12px.ttf-f0c6f7ea0d11709c60f005
[params]
Rendering=null
antialiasing=1
antialiasing=0
generate_mipmaps=false
multichannel_signed_distance_field=false
msdf_pixel_range=8
@ -27,7 +27,12 @@ Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
preload=[{
"chars": [],
"glyphs": [],
"name": "新建配置",
"size": Vector2i(16, 0)
}]
language_support={}
script_support={}
opentype_features={}

View File

@ -13,7 +13,7 @@ dest_files=["res://.godot/imported/VonwaonBitmap-16px.ttf-45ba1c29e0693eadade28f
[params]
Rendering=null
antialiasing=1
antialiasing=0
generate_mipmaps=false
multichannel_signed_distance_field=false
msdf_pixel_range=8
@ -27,7 +27,12 @@ Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
preload=[{
"chars": [],
"glyphs": [],
"name": "新建配置",
"size": Vector2i(16, 0)
}]
language_support={}
script_support={}
opentype_features={}

View File

@ -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)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 B

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

After

Width:  |  Height:  |  Size: 797 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 B

After

Width:  |  Height:  |  Size: 118 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 287 B

After

Width:  |  Height:  |  Size: 648 B

View File

@ -31,19 +31,6 @@ public abstract partial class Encyclopedia : UiBase
}
private NinePatchRect _L_NinePatchRect;
/// <summary>
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Sprite2D"/>, 节点路径: Encyclopedia.Gui
/// </summary>
public Gui L_Gui
{
get
{
if (_L_Gui == null) _L_Gui = new Gui((EncyclopediaPanel)this, GetNode<Godot.Sprite2D>("Gui"));
return _L_Gui;
}
}
private Gui _L_Gui;
public Encyclopedia() : base(nameof(Encyclopedia))
{
@ -236,7 +223,16 @@ public abstract partial class Encyclopedia : UiBase
}
/// <summary>
/// 类型: <see cref="Godot.TextureRect"/>, 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.TextureRect
/// 类型: <see cref="Godot.Label"/>, 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.Label
/// </summary>
public class Label_1 : UiNode<EncyclopediaPanel, Godot.Label, Label_1>
{
public Label_1(EncyclopediaPanel uiPanel, Godot.Label node) : base(uiPanel, node) { }
public override Label_1 Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate());
}
/// <summary>
/// 类型: <see cref="Godot.TextureRect"/>, 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.NinePatchRect.TextureRect
/// </summary>
public class TextureRect_1 : UiNode<EncyclopediaPanel, Godot.TextureRect, TextureRect_1>
{
@ -245,12 +241,12 @@ public abstract partial class Encyclopedia : UiBase
}
/// <summary>
/// 类型: <see cref="Godot.VBoxContainer"/>, 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer
/// 类型: <see cref="Godot.NinePatchRect"/>, 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.NinePatchRect
/// </summary>
public class VBoxContainer : UiNode<EncyclopediaPanel, Godot.VBoxContainer, VBoxContainer>
public class NinePatchRect_3 : UiNode<EncyclopediaPanel, Godot.NinePatchRect, NinePatchRect_3>
{
/// <summary>
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.TextureRect"/>, 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.TextureRect
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.TextureRect"/>, 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.TextureRect
/// </summary>
public TextureRect_1 L_TextureRect
{
@ -262,6 +258,63 @@ public abstract partial class Encyclopedia : UiBase
}
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());
}
/// <summary>
/// 类型: <see cref="Godot.RichTextLabel"/>, 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.RichTextLabel
/// </summary>
public class RichTextLabel : UiNode<EncyclopediaPanel, Godot.RichTextLabel, RichTextLabel>
{
public RichTextLabel(EncyclopediaPanel uiPanel, Godot.RichTextLabel node) : base(uiPanel, node) { }
public override RichTextLabel Clone() => new (UiPanel, (Godot.RichTextLabel)Instance.Duplicate());
}
/// <summary>
/// 类型: <see cref="Godot.VBoxContainer"/>, 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer
/// </summary>
public class VBoxContainer : UiNode<EncyclopediaPanel, Godot.VBoxContainer, VBoxContainer>
{
/// <summary>
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.Label"/>, 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.Label
/// </summary>
public Label_1 L_Label
{
get
{
if (_L_Label == null) _L_Label = new Label_1(UiPanel, Instance.GetNode<Godot.Label>("Label"));
return _L_Label;
}
}
private Label_1 _L_Label;
/// <summary>
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.NinePatchRect"/>, 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.NinePatchRect
/// </summary>
public NinePatchRect_3 L_NinePatchRect
{
get
{
if (_L_NinePatchRect == null) _L_NinePatchRect = new NinePatchRect_3(UiPanel, Instance.GetNode<Godot.NinePatchRect>("NinePatchRect"));
return _L_NinePatchRect;
}
}
private NinePatchRect_3 _L_NinePatchRect;
/// <summary>
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: <see cref="Godot.RichTextLabel"/>, 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.RichTextLabel
/// </summary>
public RichTextLabel L_RichTextLabel
{
get
{
if (_L_RichTextLabel == null) _L_RichTextLabel = new RichTextLabel(UiPanel, Instance.GetNode<Godot.RichTextLabel>("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,26 +455,12 @@ public abstract partial class Encyclopedia : UiBase
public override NinePatchRect Clone() => new (UiPanel, (Godot.NinePatchRect)Instance.Duplicate());
}
/// <summary>
/// 类型: <see cref="Godot.Sprite2D"/>, 路径: Encyclopedia.Gui
/// </summary>
public class Gui : UiNode<EncyclopediaPanel, Godot.Sprite2D, Gui>
{
public Gui(EncyclopediaPanel uiPanel, Godot.Sprite2D node) : base(uiPanel, node) { }
public override Gui Clone() => new (UiPanel, (Godot.Sprite2D)Instance.Duplicate());
}
/// <summary>
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.ColorRect"/>, 节点路径: Encyclopedia.ColorRect
/// </summary>
public ColorRect S_ColorRect => L_ColorRect;
/// <summary>
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Label"/>, 节点路径: Encyclopedia.NinePatchRect.TextureRect.Label
/// </summary>
public Label S_Label => L_NinePatchRect.L_TextureRect.L_Label;
/// <summary>
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.NinePatchRect"/>, 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer2.NinePatchRect.ScrollContainer.ObjectButton.Bg
/// </summary>
@ -452,6 +491,11 @@ public abstract partial class Encyclopedia : UiBase
/// </summary>
public VBoxContainer2 S_VBoxContainer2 => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer2;
/// <summary>
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.RichTextLabel"/>, 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.RichTextLabel
/// </summary>
public RichTextLabel S_RichTextLabel => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer3.L_NinePatchRect.L_VBoxContainer.L_RichTextLabel;
/// <summary>
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.VBoxContainer"/>, 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer
/// </summary>
@ -472,9 +516,4 @@ public abstract partial class Encyclopedia : UiBase
/// </summary>
public MarginContainer S_MarginContainer => L_NinePatchRect.L_MarginContainer;
/// <summary>
/// 场景中唯一名称的节点, 节点类型: <see cref="Godot.Sprite2D"/>, 节点路径: Encyclopedia.Gui
/// </summary>
public Gui S_Gui => L_Gui;
}