summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XEmblemItemDrawer.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-01-25 14:28:30 +0800
committerchai <chaifix@163.com>2021-01-25 14:28:30 +0800
commit6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch)
tree7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/XEmblemItemDrawer.cs
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/XEmblemItemDrawer.cs')
-rw-r--r--Client/Assets/Scripts/XMainClient/XEmblemItemDrawer.cs45
1 files changed, 45 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/XEmblemItemDrawer.cs b/Client/Assets/Scripts/XMainClient/XEmblemItemDrawer.cs
new file mode 100644
index 00000000..887a111a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/XEmblemItemDrawer.cs
@@ -0,0 +1,45 @@
+using System;
+using UnityEngine;
+
+namespace XMainClient
+{
+ internal class XEmblemItemDrawer : XItemDrawer
+ {
+ public override void DrawItem(GameObject go, XItem realItem, bool bForceShowNum = false)
+ {
+ this._GetUI(go);
+ bool flag = realItem == null;
+ if (flag)
+ {
+ this.DrawEmpty();
+ this._ClearVariables();
+ }
+ else
+ {
+ base._GetItemData(realItem.itemID);
+ this._SetupIcon();
+ this._SetupAttrIcon(null);
+ this._SetupName(realItem);
+ this._SetupNum(realItem);
+ this._SetupNumTop(realItem);
+ this.SetCorner(realItem);
+ this._ClearVariables();
+ }
+ }
+
+ private void SetCorner(XItem realItem)
+ {
+ bool flag = realItem == null;
+ if (!flag)
+ {
+ XEmblemItem xemblemItem = realItem as XEmblemItem;
+ base._SetupLeftDownCorner(base._GetBindingState(realItem));
+ base._SetupLeftUpCorner(xemblemItem.emblemInfo.thirdslot == 2u && !xemblemItem.bIsSkillEmblem, "");
+ base._SetupRightDownCorner(xemblemItem.emblemInfo.thirdslot == 1u && !xemblemItem.bIsSkillEmblem);
+ base._SetupRightUpCorner(realItem.Type == ItemType.FRAGMENT);
+ base._SetUpProf(false);
+ base._SetupMask();
+ }
+ }
+ }
+}