diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/UI/FashionStorageTooltipBase.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/UI/FashionStorageTooltipBase.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/UI/FashionStorageTooltipBase.cs | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/UI/FashionStorageTooltipBase.cs b/Client/Assets/Scripts/XMainClient/UI/FashionStorageTooltipBase.cs new file mode 100644 index 00000000..ec07084d --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/UI/FashionStorageTooltipBase.cs @@ -0,0 +1,103 @@ +using System;
+using UILib;
+using UnityEngine;
+
+namespace XMainClient.UI
+{
+ internal class FashionStorageTooltipBase<TDlgClass, TUIBehaviour> : TooltipDlg<TDlgClass, TUIBehaviour>, ITooltipDlg where TDlgClass : IXUIDlg, new() where TUIBehaviour : TooltipDlgBehaviour
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/FashionStorageToolTip";
+ }
+ }
+
+ protected XFashionStorageDocument m_doc;
+
+ protected XFashionDocument m_fashionDoc;
+
+ protected int itemID;
+
+ public override bool HideToolTip(bool forceHide = false)
+ {
+ return base.HideToolTip(forceHide);
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ this.m_OperateList[0, 0] = new FashionStorageFashionPutOn();
+ this.m_OperateList[0, 1] = new FashionStorageFashionPutOnSuit();
+ this.m_OperateList[1, 0] = new FashionStorageFashionTakeOff();
+ this.m_OperateList[1, 1] = new FashionStorageFashtionTakeOffSuit();
+ this.m_OperateList[1, 2] = new FashionStorageColouring();
+ this.m_OperateList[2, 0] = new FashionStorageButtonGoFashion();
+ this.m_fashionDoc = XDocuments.GetSpecificDocument<XFashionDocument>(XFashionDocument.uuID);
+ this.m_doc = XDocuments.GetSpecificDocument<XFashionStorageDocument>(XFashionStorageDocument.uuID);
+ }
+
+ protected override void SetupToolTipButtons(GameObject goToolTip, XItem item, bool bMain)
+ {
+ base.SetupToolTipButtons(goToolTip, item, bMain);
+ this.itemID = item.itemID;
+ if (bMain)
+ {
+ bool flag = this.m_doc.fashionStorageType == FashionStorageType.OutLook;
+ if (flag)
+ {
+ bool flag2 = this.m_doc.FashionInBody(item.itemID);
+ if (flag2)
+ {
+ base._SetupButtonVisiability(goToolTip, 1, item);
+ }
+ else
+ {
+ base._SetupButtonVisiability(goToolTip, 0, item);
+ }
+ }
+ else
+ {
+ base._SetupButtonVisiability(goToolTip, 2, item);
+ }
+ }
+ }
+
+ protected override bool OnButton1Clicked(IXUIButton button)
+ {
+ this._bButtonClickedThisFrame = true;
+ bool flag = this.m_OperateList[(int)button.ID, 0] != null;
+ if (flag)
+ {
+ this.m_OperateList[(int)button.ID, 0].OnButtonClick((ulong)((long)this.itemID), 0UL);
+ }
+ this.HideToolTip(true);
+ return true;
+ }
+
+ protected override bool OnButton2Clicked(IXUIButton button)
+ {
+ this._bButtonClickedThisFrame = true;
+ bool flag = this.m_OperateList[(int)button.ID, 1] != null;
+ if (flag)
+ {
+ this.m_OperateList[(int)button.ID, 1].OnButtonClick((ulong)((long)this.itemID), 0UL);
+ }
+ this.HideToolTip(true);
+ return true;
+ }
+
+ protected override bool OnButton3Clicked(IXUIButton button)
+ {
+ this._bButtonClickedThisFrame = true;
+ bool flag = this.m_OperateList[(int)button.ID, 2] != null;
+ if (flag)
+ {
+ this.m_OperateList[(int)button.ID, 2].OnButtonClick((ulong)((long)this.itemID), 0UL);
+ }
+ this.HideToolTip(true);
+ return true;
+ }
+ }
+}
|