From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XMainClient/XEmblemItemDrawer.cs | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XEmblemItemDrawer.cs (limited to 'Client/Assets/Scripts/XMainClient/XEmblemItemDrawer.cs') 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(); + } + } + } +} -- cgit v1.1-26-g67d0