summaryrefslogtreecommitdiff
path: root/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs
diff options
context:
space:
mode:
Diffstat (limited to 'SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs')
-rw-r--r--SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs b/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs
new file mode 100644
index 0000000..0f9d623
--- /dev/null
+++ b/SurvivalTest/Assets/Scripts/UI/Panel/PanelItemBar/UIItemWidget.cs
@@ -0,0 +1,30 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+public struct UIItemWidgetParam
+{
+ public ItemBase item;
+}
+
+public class UIItemWidget : UIGridPropBase
+{
+ public Image Image_Icon;
+
+ public ItemBase item { get { return m_Item; } }
+ private ItemBase m_Item;
+
+ public override void Set(object param)
+ {
+ UIItemWidgetParam info = (UIItemWidgetParam)param;
+ m_Item = info.item;
+
+ Image_Icon.sprite = ResourceManager.Instance.Load<Sprite>(info.item.iconPath);
+ }
+
+ private void Update()
+ {
+ }
+
+} \ No newline at end of file