예제 #1
0
 public static void Show(ItemInfo info, GUIAwakeItemInfoPopUp.EOpenType type, UIEventListener.VoidDelegate cb)
 {
     if (info == null)
     {
         global::Debug.LogErrorFormat("ItemInfo info is null", new object[0]);
         return;
     }
     GameUIPopupManager.GetInstance().PushState(GameUIPopupManager.eSTATE.GUIAwakeItemInfoPopUp, false, null, null);
     GameUIPopupManager.GetInstance().GetCurrentPopup().InitPopUp(info, type, cb);
 }
예제 #2
0
 public override void InitPopUp(ItemInfo info, GUIAwakeItemInfoPopUp.EOpenType type, UIEventListener.VoidDelegate cb)
 {
     if (info == null)
     {
         return;
     }
     this.mItemInfo = info;
     this.OnEquipClickEvent = cb;
     CommonIconItem.Create(this.mInfoLayer, new Vector3(-150f, 160f, 0f), null, false, 0.9f, null).Refresh(this.mItemInfo, false, false, false);
     this.mName.text = info.Name;
     this.mName.color = Tools.GetItemQualityColor(info.Quality);
     this.mAtts.text = this.GetItemAtt(info);
     this.mValues.text = this.GetItemAttValue(info);
     this.mDesc.text = info.Desc;
     this.SwitchType(type, true);
     this.Refresh();
 }
예제 #3
0
 public void Init(GUIAwakeItemInfoPopUp basescene)
 {
     this.mBaseScene = basescene;
 }
예제 #4
0
 public void SwitchType(GUIAwakeItemInfoPopUp.EOpenType type, bool isInit = false)
 {
     this.mType = type;
     this.mGetBtn.SetActive(false);
     this.mCreateBtn.SetActive(false);
     this.mEquipBtn.SetActive(false);
     this.mOKBtn.SetActive(false);
     switch (this.mType)
     {
     case GUIAwakeItemInfoPopUp.EOpenType.EOT_View:
         this.mOKBtn.SetActive(true);
         break;
     case GUIAwakeItemInfoPopUp.EOpenType.EOT_Equip:
         this.mEquipBtn.SetActive(true);
         break;
     case GUIAwakeItemInfoPopUp.EOpenType.EOT_Get:
     {
         bool flag = Globals.Instance.AttDB.AwakeRecipeDict.GetInfo(this.mItemInfo.ID) != null;
         bool flag2 = this.mItemInfo.Source != 0;
         if (flag && flag2)
         {
             this.mGetBtn.SetActive(true);
             this.mCreateBtn.SetActive(true);
             this.mGetBtn.transform.localPosition = new Vector3(-80f, -184f, 0f);
             this.mCreateBtn.transform.localPosition = new Vector3(80f, -184f, 0f);
             if (isInit)
             {
                 this.PlayAnim(true, true);
                 this.mDetailLayer.Refresh(this.mItemInfo, true);
             }
         }
         else if (flag && !flag2)
         {
             this.mCreateBtn.SetActive(true);
             this.mCreateBtn.transform.localPosition = new Vector3(0f, -184f, 0f);
             if (isInit)
             {
                 this.PlayAnim(true, true);
                 this.mDetailLayer.Refresh(this.mItemInfo, false);
             }
         }
         else if (!flag && flag2)
         {
             this.mGetBtn.SetActive(true);
             this.mGetBtn.transform.localPosition = new Vector3(0f, -184f, 0f);
             if (isInit)
             {
                 this.PlayAnim(true, true);
                 this.mDetailLayer.Refresh(this.mItemInfo, true);
             }
         }
         else
         {
             this.mOKBtn.SetActive(true);
         }
         break;
     }
     }
 }
예제 #5
0
 public virtual void InitPopUp(ItemInfo itemInfo, GUIAwakeItemInfoPopUp.EOpenType type, UIEventListener.VoidDelegate cb)
 {
 }