diff --git a/DungeonShooting_Godot/prefab/ui/Encyclopedia.tscn b/DungeonShooting_Godot/prefab/ui/Encyclopedia.tscn
index 0492f40..1a028c7 100644
--- a/DungeonShooting_Godot/prefab/ui/Encyclopedia.tscn
+++ b/DungeonShooting_Godot/prefab/ui/Encyclopedia.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=11 format=3 uid="uid://b2xq02i3vxct"]
+[gd_scene load_steps=14 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"]
@@ -8,7 +8,9 @@
[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://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"]
+[ext_resource type="Shader" path="res://resource/material/Outline.gdshader" id="9_mmpq6"]
+[ext_resource type="Texture2D" uid="uid://cuas0bdjlpmwb" path="res://resource/sprite/ui/encyclopedia/Close.png" id="10_jgsfw"]
+[ext_resource type="Texture2D" uid="uid://7x5b5ed7hk7w" path="res://resource/sprite/ui/encyclopedia/CloseSelect.png" id="11_247gy"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_gm0bl"]
resource_local_to_scene = true
@@ -22,6 +24,11 @@
shader_parameter/outline_use_blend = true
shader_parameter/grey = 0.0
+[sub_resource type="ShaderMaterial" id="ShaderMaterial_qdxtu"]
+resource_local_to_scene = true
+shader = ExtResource("9_mmpq6")
+shader_parameter/outline_color = Color(1, 1, 1, 1)
+
[node name="Encyclopedia" type="Control"]
layout_mode = 3
anchors_preset = 15
@@ -218,7 +225,7 @@
patch_margin_right = 56
patch_margin_bottom = 56
-[node name="VBoxContainer" type="VBoxContainer" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect"]
+[node name="ItemInfoBg" type="VBoxContainer" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@@ -231,13 +238,13 @@
grow_vertical = 2
theme_override_constants/separation = 16
-[node name="ItemName" type="Label" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect/VBoxContainer"]
+[node name="ItemName" type="Label" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect/ItemInfoBg"]
layout_mode = 2
text = "名称"
horizontal_alignment = 1
vertical_alignment = 1
-[node name="NinePatchRect" type="NinePatchRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect/VBoxContainer"]
+[node name="NinePatchRect" type="NinePatchRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect/ItemInfoBg"]
custom_minimum_size = Vector2(396, 300)
layout_mode = 2
texture = ExtResource("4_21546")
@@ -246,8 +253,8 @@
patch_margin_right = 56
patch_margin_bottom = 56
-[node name="ItemTexture" type="TextureRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect/VBoxContainer/NinePatchRect"]
-material = ExtResource("7_yd5ks")
+[node name="ItemTexture" type="TextureRect" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect/ItemInfoBg/NinePatchRect"]
+material = SubResource("ShaderMaterial_qdxtu")
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@@ -262,7 +269,21 @@
size_flags_vertical = 3
stretch_mode = 3
-[node name="ItemDes" type="RichTextLabel" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect/VBoxContainer"]
+[node name="ItemDes" type="RichTextLabel" parent="NinePatchRect/MarginContainer/HBoxContainer/VBoxContainer3/NinePatchRect/ItemInfoBg"]
layout_mode = 2
size_flags_vertical = 3
text = "文本描述"
+
+[node name="CloseButton" type="TextureButton" parent="NinePatchRect"]
+layout_mode = 1
+anchors_preset = 1
+anchor_left = 1.0
+anchor_right = 1.0
+offset_left = -88.0
+offset_top = -20.0
+offset_right = -24.0
+offset_bottom = 44.0
+grow_horizontal = 0
+texture_normal = ExtResource("10_jgsfw")
+texture_pressed = ExtResource("11_247gy")
+texture_hover = ExtResource("11_247gy")
diff --git a/DungeonShooting_Godot/resource/material/Outline.tres b/DungeonShooting_Godot/resource/material/Outline.tres
index 20a502c..c789b00 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(1, 1, 1, 1)
+shader_parameter/outline_color = Color(0, 0, 0, 1)
diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Close.png b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Close.png
new file mode 100644
index 0000000..fc80262
--- /dev/null
+++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Close.png
Binary files differ
diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Close.png.import b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Close.png.import
new file mode 100644
index 0000000..cd331fb
--- /dev/null
+++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/Close.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://cuas0bdjlpmwb"
+path="res://.godot/imported/Close.png-3fada0779c1a516124741b6f9a05cf93.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://resource/sprite/ui/encyclopedia/Close.png"
+dest_files=["res://.godot/imported/Close.png-3fada0779c1a516124741b6f9a05cf93.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/CloseSelect.png b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/CloseSelect.png
new file mode 100644
index 0000000..1315207
--- /dev/null
+++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/CloseSelect.png
Binary files differ
diff --git a/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/CloseSelect.png.import b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/CloseSelect.png.import
new file mode 100644
index 0000000..6daed77
--- /dev/null
+++ b/DungeonShooting_Godot/resource/sprite/ui/encyclopedia/CloseSelect.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://7x5b5ed7hk7w"
+path="res://.godot/imported/CloseSelect.png-63b474fe46efaecaa35172d820b3b06d.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://resource/sprite/ui/encyclopedia/CloseSelect.png"
+dest_files=["res://.godot/imported/CloseSelect.png-63b474fe46efaecaa35172d820b3b06d.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
diff --git a/DungeonShooting_Godot/src/game/camera/GameCamera.cs b/DungeonShooting_Godot/src/game/camera/GameCamera.cs
index 2a4076e..d5c8833 100644
--- a/DungeonShooting_Godot/src/game/camera/GameCamera.cs
+++ b/DungeonShooting_Godot/src/game/camera/GameCamera.cs
@@ -67,8 +67,9 @@
private Vector2 _camPos;
private Vector2 _shakeOffset = Vector2.Zero;
- public ShaderMaterial _offsetShader;
-
+ private ShaderMaterial _offsetShader;
+ private int lockIndex = 0;
+
public GameCamera()
{
Main = this;
@@ -87,7 +88,7 @@
_Shake(newDelta);
var world = World.Current;
- if (world != null && _followTarget != null)
+ if (world != null && _followTarget != null && lockIndex <= 0)
{
var mousePosition = InputManager.CursorPosition;
var targetPosition = _followTarget.GlobalPosition;
@@ -190,6 +191,22 @@
}
+ ///
+ /// 锁住相机视角移动
+ ///
+ public void LockCamera()
+ {
+ lockIndex++;
+ }
+
+ ///
+ /// 解锁相机视角移动
+ ///
+ public void UnLockCamera()
+ {
+ lockIndex--;
+ }
+
//抖动调用
private void _Shake(float delta)
{
diff --git a/DungeonShooting_Godot/src/game/ui/encyclopedia/Encyclopedia.cs b/DungeonShooting_Godot/src/game/ui/encyclopedia/Encyclopedia.cs
index 00c46dd..91d3480 100644
--- a/DungeonShooting_Godot/src/game/ui/encyclopedia/Encyclopedia.cs
+++ b/DungeonShooting_Godot/src/game/ui/encyclopedia/Encyclopedia.cs
@@ -289,7 +289,7 @@
}
///
- /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.ItemName
+ /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg.ItemName
///
public class ItemName : UiNode
{
@@ -298,7 +298,7 @@
}
///
- /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.NinePatchRect.ItemTexture
+ /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg.NinePatchRect.ItemTexture
///
public class ItemTexture : UiNode
{
@@ -307,12 +307,12 @@
}
///
- /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.NinePatchRect
+ /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg.NinePatchRect
///
public class NinePatchRect_3 : UiNode
{
///
- /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.ItemTexture
+ /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg.ItemTexture
///
public ItemTexture L_ItemTexture
{
@@ -329,7 +329,7 @@
}
///
- /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.ItemDes
+ /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg.ItemDes
///
public class ItemDes : UiNode
{
@@ -338,9 +338,9 @@
}
///
- /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer
+ /// 类型: , 路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg
///
- public class VBoxContainer : UiNode
+ public class ItemInfoBg : UiNode
{
///
/// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemName
@@ -381,8 +381,8 @@
}
private ItemDes _L_ItemDes;
- public VBoxContainer(EncyclopediaPanel uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { }
- public override VBoxContainer Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate());
+ public ItemInfoBg(EncyclopediaPanel uiPanel, Godot.VBoxContainer node) : base(uiPanel, node) { }
+ public override ItemInfoBg Clone() => new (UiPanel, (Godot.VBoxContainer)Instance.Duplicate());
}
///
@@ -391,17 +391,17 @@
public class NinePatchRect_2 : UiNode
{
///
- /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.VBoxContainer
+ /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.ItemInfoBg
///
- public VBoxContainer L_VBoxContainer
+ public ItemInfoBg L_ItemInfoBg
{
get
{
- if (_L_VBoxContainer == null) _L_VBoxContainer = new VBoxContainer(UiPanel, Instance.GetNode("VBoxContainer"));
- return _L_VBoxContainer;
+ if (_L_ItemInfoBg == null) _L_ItemInfoBg = new ItemInfoBg(UiPanel, Instance.GetNode("ItemInfoBg"));
+ return _L_ItemInfoBg;
}
}
- private VBoxContainer _L_VBoxContainer;
+ private ItemInfoBg _L_ItemInfoBg;
public NinePatchRect_2(EncyclopediaPanel uiPanel, Godot.NinePatchRect node) : base(uiPanel, node) { }
public override NinePatchRect_2 Clone() => new (UiPanel, (Godot.NinePatchRect)Instance.Duplicate());
@@ -487,6 +487,15 @@
}
///
+ /// 类型: , 路径: Encyclopedia.NinePatchRect.CloseButton
+ ///
+ public class CloseButton : UiNode
+ {
+ public CloseButton(EncyclopediaPanel uiPanel, Godot.TextureButton node) : base(uiPanel, node) { }
+ public override CloseButton Clone() => new (UiPanel, (Godot.TextureButton)Instance.Duplicate());
+ }
+
+ ///
/// 类型: , 路径: Encyclopedia.NinePatchRect
///
public class NinePatchRect : UiNode
@@ -517,6 +526,19 @@
}
private MarginContainer _L_MarginContainer;
+ ///
+ /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: Encyclopedia.CloseButton
+ ///
+ public CloseButton L_CloseButton
+ {
+ get
+ {
+ if (_L_CloseButton == null) _L_CloseButton = new CloseButton(UiPanel, Instance.GetNode("CloseButton"));
+ return _L_CloseButton;
+ }
+ }
+ private CloseButton _L_CloseButton;
+
public NinePatchRect(EncyclopediaPanel uiPanel, Godot.NinePatchRect node) : base(uiPanel, node) { }
public override NinePatchRect Clone() => new (UiPanel, (Godot.NinePatchRect)Instance.Duplicate());
}
@@ -583,24 +605,24 @@
public VBoxContainer2 S_VBoxContainer2 => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer2;
///
- /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.ItemName
+ /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg.ItemName
///
- public ItemName S_ItemName => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer3.L_NinePatchRect.L_VBoxContainer.L_ItemName;
+ public ItemName S_ItemName => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer3.L_NinePatchRect.L_ItemInfoBg.L_ItemName;
///
- /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.NinePatchRect.ItemTexture
+ /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg.NinePatchRect.ItemTexture
///
- public ItemTexture S_ItemTexture => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer3.L_NinePatchRect.L_VBoxContainer.L_NinePatchRect.L_ItemTexture;
+ public ItemTexture S_ItemTexture => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer3.L_NinePatchRect.L_ItemInfoBg.L_NinePatchRect.L_ItemTexture;
///
- /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer.ItemDes
+ /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg.ItemDes
///
- public ItemDes S_ItemDes => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer3.L_NinePatchRect.L_VBoxContainer.L_ItemDes;
+ public ItemDes S_ItemDes => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer3.L_NinePatchRect.L_ItemInfoBg.L_ItemDes;
///
- /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.VBoxContainer
+ /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3.NinePatchRect.ItemInfoBg
///
- public VBoxContainer S_VBoxContainer => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer3.L_NinePatchRect.L_VBoxContainer;
+ public ItemInfoBg S_ItemInfoBg => L_NinePatchRect.L_MarginContainer.L_HBoxContainer.L_VBoxContainer3.L_NinePatchRect.L_ItemInfoBg;
///
/// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.MarginContainer.HBoxContainer.VBoxContainer3
@@ -617,4 +639,9 @@
///
public MarginContainer S_MarginContainer => L_NinePatchRect.L_MarginContainer;
+ ///
+ /// 场景中唯一名称的节点, 节点类型: , 节点路径: Encyclopedia.NinePatchRect.CloseButton
+ ///
+ public CloseButton S_CloseButton => L_NinePatchRect.L_CloseButton;
+
}
diff --git a/DungeonShooting_Godot/src/game/ui/encyclopedia/EncyclopediaPanel.cs b/DungeonShooting_Godot/src/game/ui/encyclopedia/EncyclopediaPanel.cs
index 1bc52f2..f106ca2 100644
--- a/DungeonShooting_Godot/src/game/ui/encyclopedia/EncyclopediaPanel.cs
+++ b/DungeonShooting_Godot/src/game/ui/encyclopedia/EncyclopediaPanel.cs
@@ -10,10 +10,12 @@
private UiGrid _tab;
//item网格
private UiGrid _grid;
- private long _id;
+ //private long _id;
public override void OnCreateUi()
{
+ S_CloseButton.Instance.Pressed += OnCloseClick;
+
_tab = CreateUiGrid(S_TabButton);
_tab.SetColumns(10);
_tab.SetCellOffset(new Vector2I(0, 0));
@@ -29,23 +31,43 @@
_tab.SelectIndex = 0;
}
+ public override void OnShowUi()
+ {
+ GameCamera.Main.LockCamera();
+ }
+
+ public override void OnHideUi()
+ {
+ GameCamera.Main.UnLockCamera();
+ }
+
public override void OnDestroyUi()
{
}
+ public override void Process(float delta)
+ {
+ if (Input.IsActionJustPressed("ui_cancel"))
+ {
+ OnCloseClick();
+ }
+ }
+
///
/// 设置选中的tab
///
public void SelectTab(ActivityType type)
{
- StopCoroutine(_id);
- _id = StartCoroutine(
- _grid.SetDataListCoroutine(
- ExcelConfig.ActivityBase_List.Where(data => data.Type == type).ToArray()
- )
+ // StopCoroutine(_id);
+ // _id = StartCoroutine(
+ // _grid.SetDataListCoroutine(
+ // ExcelConfig.ActivityBase_List.Where(data => data.Type == type).ToArray()
+ // )
+ // );
+ _grid.SetDataList(
+ ExcelConfig.ActivityBase_List.Where(data => data.Type == type).ToArray()
);
-
SelectItem(null);
}
@@ -56,6 +78,7 @@
{
if (config != null)
{
+ S_ItemInfoBg.Instance.Visible = true;
S_ItemName.Instance.Text = config.Name;
S_ItemTexture.Instance.Texture = ResourceManager.LoadTexture2D(config.Icon);
S_ItemDes.Instance.Text = config.Intro;
@@ -63,10 +86,23 @@
}
else
{
+ S_ItemInfoBg.Instance.Visible = false;
S_ItemName.Instance.Text = null;
S_ItemTexture.Instance.Texture = null;
S_ItemDes.Instance.Text = null;
}
}
+ private void OnCloseClick()
+ {
+ if (PrevUi != null)
+ {
+ OpenPrevUi();
+ }
+ else
+ {
+ Destroy();
+ }
+ }
+
}
diff --git a/DungeonShooting_Godot/src/game/ui/encyclopedia/ItemCell.cs b/DungeonShooting_Godot/src/game/ui/encyclopedia/ItemCell.cs
index 376a2dd..4173ac7 100644
--- a/DungeonShooting_Godot/src/game/ui/encyclopedia/ItemCell.cs
+++ b/DungeonShooting_Godot/src/game/ui/encyclopedia/ItemCell.cs
@@ -10,12 +10,22 @@
CellNode.L_Select.Instance.Visible = false;
}
+ public override void OnSetData(ExcelConfig.ActivityBase data)
+ {
+ CellNode.L_PreviewImage.Instance.Texture = ResourceManager.LoadTexture2D(data.Icon);
+ }
+
public override IEnumerator OnSetDataCoroutine(ExcelConfig.ActivityBase data)
{
CellNode.L_PreviewImage.Instance.Texture = ResourceManager.LoadTexture2D(data.Icon);
yield break;
}
+ public override void OnDisable()
+ {
+ CellNode.L_PreviewImage.Instance.Texture = null;
+ }
+
public override void OnSelect()
{
CellNode.L_Select.Instance.Visible = true;
diff --git a/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenuPanel.cs b/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenuPanel.cs
index 0328541..12750a2 100644
--- a/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenuPanel.cs
+++ b/DungeonShooting_Godot/src/game/ui/pauseMenu/PauseMenuPanel.cs
@@ -26,6 +26,16 @@
S_Restart.Instance.Visible = false;
}
}
+
+ public override void OnShowUi()
+ {
+ GameCamera.Main.LockCamera();
+ }
+
+ public override void OnHideUi()
+ {
+ GameCamera.Main.UnLockCamera();
+ }
public override void Process(float delta)
{