Example #1
0
 private void CreateObjects()
 {
     this.mEquipIconItem = CommonIconItem.Create(base.gameObject, new Vector3(-161f, 38f, 0f), null, false, 0.8f, null);
     this.mName = GameUITools.FindUILabel("Name", base.gameObject);
     this.mSlider = GameUITools.FindGameObject("Bar", base.gameObject).GetComponent<UISlider>();
     this.mValue = GameUITools.FindUILabel("Value", this.mSlider.gameObject);
 }
Example #2
0
 private void CreateObjects()
 {
     this.mEquipIconItem = CommonIconItem.Create(base.gameObject, new Vector3(-171f, 75f), null, false, 0.8f, null);
     this.mName = GameUITools.FindUILabel("Name", base.gameObject);
     this.mNumValue = GameUITools.FindUILabel("Num/Value", base.gameObject);
     this.mDesc = GameUITools.FindUILabel("Desc", base.gameObject);
     GameUITools.RegisterClickEvent("CloseBtn", new UIEventListener.VoidDelegate(this.OnCloseBtnClick), base.gameObject);
 }
 public void Init(AwakeItemDetailLayer baselayer)
 {
     this.mBaseLayer = baselayer;
     this.mName = GameUITools.FindUILabel("Name", base.gameObject);
     this.mUI53 = GameUITools.FindGameObject("ui53", base.gameObject);
     Tools.SetParticleRQWithUIScale(this.mUI53, 5500);
     this.mUI53.gameObject.SetActive(false);
     this.mIcon = CommonIconItem.Create(base.gameObject, new Vector3(-43f, 66f, 0f), null, false, 0.9f, null);
     this.mTreeBG = GameUITools.FindUISprite("TreeBG", base.gameObject);
     this.mLeftBranch = GameUITools.FindUISprite("LeftBranch", this.mTreeBG.gameObject);
     this.mRightBranch = GameUITools.FindUISprite("RightBranch", this.mTreeBG.gameObject);
     for (int i = 0; i < 4; i++)
     {
         this.mLeafIcons.Add(CommonIconItem.Create(base.gameObject, new Vector3(0f, 0f, 0f), null, true, 0.5f, null).SetNumStyle(30));
         this.mLeafIcons[i].OnItemIconClickEvent = new CommonIconItem.ItemInfoCallBack(this.OnLeafIconClick);
     }
     this.mCoseValue = GameUITools.FindUILabel("Cost/Value", base.gameObject);
     GameUITools.RegisterClickEvent("Create", new UIEventListener.VoidDelegate(this.OnCreateClick), base.gameObject);
     Globals.Instance.CliSession.Register(537, new ClientSession.MsgHandler(this.OnMsgAwakeItemCreate));
     LocalPlayer expr_192 = Globals.Instance.Player;
     expr_192.PlayerUpdateEvent = (LocalPlayer.VoidCallback)Delegate.Combine(expr_192.PlayerUpdateEvent, new LocalPlayer.VoidCallback(this.OnPlayerUpdateEvent));
 }
 private void RefreshOutInfo()
 {
     if (this.mCurPetData == null)
     {
         this.mOutAdd.SetActive(false);
         this.mOutTips.SetActive(false);
         this.mOutInfo.SetActive(false);
         if (this.mOutIcon != null)
         {
             this.mOutIcon.gameObject.SetActive(false);
         }
     }
     else if (this.mTargetPet == null)
     {
         this.mOutAdd.SetActive(true);
         this.mOutTips.SetActive(true);
         this.mOutInfo.SetActive(false);
         if (this.mOutIcon != null)
         {
             this.mOutIcon.gameObject.SetActive(false);
         }
     }
     else
     {
         this.mOutAdd.SetActive(false);
         this.mOutTips.SetActive(false);
         this.mOutInfo.SetActive(true);
         if (this.mOutIcon == null)
         {
             this.mOutIcon = CommonIconItem.Create(this.mOutInfo, new Vector3(-153f, 120f, 0f), new CommonIconItem.VoidCallBack(this.OnOutAddClick), true, 0.8f, null);
         }
         if (this.mOutIcon != null)
         {
             this.mOutIcon.gameObject.SetActive(true);
         }
         this.mOutIcon.Refresh(this.mTargetPet, false, false, false);
         if (this.mCurPetData.Data.Further > 0u)
         {
             this.mOutName.text = Singleton<StringManager>.Instance.GetString("equipImprove14", new object[]
             {
                 Tools.GetPetName(this.mTargetPet.Info),
                 this.mCurPetData.Data.Further
             });
         }
         else
         {
             this.mOutName.text = Tools.GetPetName(this.mTargetPet.Info);
         }
         this.mOutName.color = Tools.GetItemQualityColor(this.mTargetPet.Info.Quality);
         this.mOutLevel.text = Singleton<StringManager>.Instance.GetString("equipImprove16", new object[]
         {
             this.mCurPetData.Data.Level
         });
         uint num = 0u;
         this.mOutStars.Refresh((int)Tools.GetPetStarAndLvl(this.mCurPetData.Data.Awake, out num));
         this.mOutValues.Refresh(new PetDataEx(this.mCurPetData.Data, this.mTargetPet.Info), true);
         this.mOutSkills.Refresh(new PetDataEx(this.mCurPetData.Data, this.mTargetPet.Info), false);
     }
     this.RefreshCost();
     this.RefreshChangeBtn();
 }
Example #5
0
 private void SetType(CommonIconItem.ECIIT type)
 {
     this.mMinus.enabled = this.showMinus;
     this.mItemIcon.enabled = false;
     this.mPetIcon.enabled = false;
     this.mAvatarIcon.enabled = false;
     this.mLopetIcon.enabled = false;
     switch (type)
     {
     case CommonIconItem.ECIIT.ECIIT_Item:
         this.mItemIcon.enabled = true;
         this.RefreshItem();
         break;
     case CommonIconItem.ECIIT.ECIIT_Pet:
         this.mPetIcon.enabled = true;
         this.RefreshPet();
         break;
     case CommonIconItem.ECIIT.ECIIT_Reward:
         this.mItemIcon.enabled = true;
         this.RefreshReward();
         break;
     case CommonIconItem.ECIIT.ECIIT_Fashion:
         this.mAvatarIcon.enabled = true;
         this.RefreshFashion();
         break;
     case CommonIconItem.ECIIT.ECIIT_Lopet:
         this.mLopetIcon.enabled = true;
         this.RefreshLopet();
         break;
     }
 }
Example #6
0
 public static CommonIconItem Create(GameObject parent, Vector3 pos, CommonIconItem.VoidCallBack IconClick, bool enableTouch = true, float scale = 1f, CommonIconItem.VoidCallBack MinusClick = null)
 {
     GameObject gameObject = Res.LoadGUI("GUI/CommonIconItem");
     if (gameObject == null)
     {
         global::Debug.LogError(new object[]
         {
             "Res.LoadGUI GUI/CommonIconItem error"
         });
         return null;
     }
     GameObject gameObject2 = (GameObject)UnityEngine.Object.Instantiate(gameObject);
     gameObject2.SetActive(true);
     GameUITools.AddChild(parent, gameObject2);
     gameObject2.transform.localPosition = pos;
     gameObject2.transform.localScale = new Vector3(scale, scale, 1f);
     CommonIconItem commonIconItem = gameObject2.AddComponent<CommonIconItem>();
     commonIconItem.Init();
     if (enableTouch)
     {
         if (IconClick != null)
         {
             CommonIconItem expr_85 = commonIconItem;
             expr_85.OnIconClickEvent = (CommonIconItem.VoidCallBack)Delegate.Combine(expr_85.OnIconClickEvent, IconClick);
         }
     }
     else
     {
         commonIconItem.collider.enabled = false;
     }
     if (MinusClick != null)
     {
         CommonIconItem expr_B4 = commonIconItem;
         expr_B4.OnMinusClickEvent = (CommonIconItem.VoidCallBack)Delegate.Combine(expr_B4.OnMinusClickEvent, MinusClick);
     }
     return commonIconItem;
 }
Example #7
0
 private void CreateObjects()
 {
     this.mIconItem = base.gameObject.GetComponent<CommonIconItem>();
 }
Example #8
0
 protected void CreateItemIcon(bool gold)
 {
     if (gold)
     {
         if (this.mGoldItemIcon == null)
         {
             this.mGoldItemIcon = CommonIconItem.Create(this.mGoldNum.gameObject, new Vector3(3f, 5f, 0f), null, false, 0.35f, null);
         }
     }
     else if (this.mDiamondItemIcon == null)
     {
         this.mDiamondItemIcon = CommonIconItem.Create(this.mDiamondNum.gameObject, new Vector3(3f, 5f, 0f), null, false, 0.35f, null);
     }
 }
Example #9
0
 private void CreateObjects()
 {
     GameUITools.RegisterClickEvent("CloseBtn", new UIEventListener.VoidDelegate(this.OnCloseClick), base.gameObject);
     this.mTitle = GameUITools.FindUILabel("Title", base.gameObject);
     this.mIcon = CommonIconItem.Create(base.gameObject, new Vector3(-170f, 80f, 0f), null, false, 0.8f, null);
     this.mName = GameUITools.FindUILabel("Name", base.gameObject);
     this.mNum = GameUITools.FindUILabel("Num", base.gameObject);
     this.mSliderInput = GameUITools.FindGameObject("SliderNumberInput", base.gameObject).AddComponent<UISliderNumberInput>();
     this.mSliderInput.Init(new EventDelegate.Callback(this.OnNumberInputChanged));
     this.mTips = GameUITools.FindUILabel("Tips", base.gameObject);
     this.mTipsIcon = GameUITools.FindUISprite("Icon", this.mTips.gameObject);
     this.mTipsValue = GameUITools.FindUILabel("Value", this.mTips.gameObject);
     this.mUseLabel = GameUITools.FindUILabel("Label", GameUITools.RegisterClickEvent("Use", new UIEventListener.VoidDelegate(this.OnUseClick), base.gameObject));
 }
 private void CreateObjects()
 {
     GameObject gameObject = base.transform.Find("Bg").gameObject;
     this.mName = gameObject.transform.Find("Name").GetComponent<UILabel>();
     this.mNum = gameObject.transform.Find("Num").GetComponent<UILabel>();
     this.mTipTxt = gameObject.transform.Find("txt0").GetComponent<UILabel>();
     this.mLootPanel = gameObject.transform.Find("lootPanel").gameObject;
     this.mContentsTable = GameUITools.FindGameObject("lootContents", this.mLootPanel.gameObject).AddComponent<SourceItemUITable>();
     this.mContentsTable.maxPerLine = 1;
     this.mContentsTable.arrangement = UICustomGrid.Arrangement.Vertical;
     this.mContentsTable.cellWidth = 362f;
     this.mContentsTable.cellHeight = 76f;
     this.mContentsTable.gapHeight = 6f;
     this.mContentsTable.gapWidth = 0f;
     this.mContentsTable.bgScrollView = GameUITools.FindGameObject("PanelBG", gameObject).GetComponent<UIDragScrollView>();
     this.mIconItem = CommonIconItem.Create(base.gameObject, new Vector3(-166f, 217f, 0f), null, false, 0.9f, null);
     GameObject gameObject2 = gameObject.transform.Find("closebtn").gameObject;
     UIEventListener expr_163 = UIEventListener.Get(gameObject2.gameObject);
     expr_163.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_163.onClick, new UIEventListener.VoidDelegate(this.OnCloseBtnClicked));
 }
Example #11
0
 protected void CreateObjects()
 {
     this.mBG = base.gameObject.GetComponent<UISprite>();
     this.mIconItem = CommonIconItem.Create(base.gameObject, new Vector3(11f, -9f, 0f), new CommonIconItem.VoidCallBack(this.OnIconClick), true, 0.9f, null);
     this.mLevel = GameUITools.FindUILabel("Level", base.gameObject);
     this.mName = GameUITools.FindUILabel("Name", base.gameObject);
     this.mInfoPanel = GameUITools.FindGameObject("InfoPanel", base.gameObject);
     this.mInfo = GameUITools.FindUISprite("Info", this.mInfoPanel.gameObject);
     this.mList = GameUITools.FindGameObject("List", this.mInfoPanel.gameObject);
     this.mPoint0 = GameUITools.FindUILabel("Point0", this.mInfo.gameObject);
     this.mPoint0Value = GameUITools.FindUILabel("Value", this.mPoint0.gameObject);
     this.mPoint1 = GameUITools.FindUILabel("Point1", this.mInfo.gameObject);
     this.mPoint1Value = GameUITools.FindUILabel("Value", this.mPoint1.gameObject);
     this.mRefineLevel = GameUITools.FindUILabel("RefineLevel", this.mInfo.gameObject);
     this.mRefineLevelBG = GameUITools.FindUISprite("BG", this.mRefineLevel.gameObject);
     this.mDesc = GameUITools.FindUILabel("Desc", this.mInfo.gameObject);
     this.mRelation = GameUITools.FindUILabel("Relation", this.mInfo.gameObject);
     this.mStars = GameUITools.FindGameObject("Stars", this.mInfo.gameObject).AddComponent<GUIStars>();
     this.mStars.Init(5);
     this.mOwner = GameUITools.FindUILabel("Owner", base.gameObject);
     this.mOwner.gameObject.SetActive(true);
     this.mPrice = GameUITools.FindUILabel("Price", base.gameObject);
     this.mPriceName = GameUITools.FindUILabel("Name", this.mPrice.gameObject);
     this.mPriceIcon = GameUITools.FindUISprite("Icon", this.mPrice.gameObject);
     this.mSelectToggle = GameUITools.FindGameObject("SelectToggle", base.gameObject).AddComponent<CommonBagItemToggle>();
     CommonBagItemToggle expr_25A = this.mSelectToggle;
     expr_25A.ValueChangeEvent = (CommonBagItemToggle.ValueChangeCallBack)Delegate.Combine(expr_25A.ValueChangeEvent, new CommonBagItemToggle.ValueChangeCallBack(this.OnSelectToggleChange));
     CommonBagItemToggle expr_282 = this.mSelectToggle;
     expr_282.PreValueChangeEvent = (CommonBagItemToggle.PreValueChangeCallBack)Delegate.Combine(expr_282.PreValueChangeEvent, new CommonBagItemToggle.PreValueChangeCallBack(this.OnPreSelectToggleChange));
     this.mEnhanceBtn = GameUITools.RegisterClickEvent("Enhance", new UIEventListener.VoidDelegate(this.OnEnhanceClick), this.mList);
     this.mEnhanceLb = GameUITools.FindUILabel("Label", this.mEnhanceBtn);
     this.mEnhanceMax = GameUITools.FindUILabel("Max", this.mEnhanceBtn);
     this.mRefineBtn = GameUITools.RegisterClickEvent("Refine", new UIEventListener.VoidDelegate(this.OnRefineClick), this.mList);
     this.mRefineLb = GameUITools.FindUILabel("Label", this.mRefineBtn);
     this.mRefineMax = GameUITools.FindUILabel("Max", this.mRefineBtn);
     this.mRefineLock = GameUITools.FindUISprite("Lock", this.mRefineBtn);
     this.mListGoBtn = GameUITools.RegisterClickEvent("ListGo", new UIEventListener.VoidDelegate(this.OnListGoBtnClick), this.mList);
     this.mListBtn = GameUITools.RegisterClickEvent("ListBtn", new UIEventListener.VoidDelegate(this.OnListBtnClick), base.gameObject);
     this.mClickableBtnSprite = GameUITools.RegisterClickEvent("ClickableBtn", new UIEventListener.VoidDelegate(this.OnClickableBtnClick), base.gameObject).GetComponent<UISprite>();
     this.mClickableBtn = this.mClickableBtnSprite.GetComponent<UIButton>();
     this.mClickableBtns = this.mClickableBtnSprite.GetComponents<UIButton>();
     this.mClickableBtnTxt = GameUITools.FindUILabel("Txt", this.mClickableBtnSprite.gameObject);
     this.mClickableBtnEffect = GameUITools.FindGameObject("Effect", this.mClickableBtnSprite.gameObject);
     this.mClickableBtnEffect.gameObject.SetActive(false);
     if (this.IsShowPanel())
     {
         this.mListBtn.SetActive(true);
     }
     else
     {
         this.mListBtn.SetActive(false);
         UIWidget component = this.mInfo.GetComponent<UIWidget>();
         component.bottomAnchor.target = null;
         component.topAnchor.target = null;
         component.leftAnchor.target = null;
         component.rightAnchor.target = null;
     }
     if (this.ShowSelect())
     {
         this.mSelectToggle.gameObject.SetActive(true);
     }
     else
     {
         this.mSelectToggle.gameObject.SetActive(false);
     }
     this.InitObjects();
     GameUITools.UpdateUIBoxCollider(base.transform, 8f, true);
 }
 private void Init()
 {
     this.hasInit = true;
     this.mName = GameUITools.FindUILabel("Name", base.gameObject);
     this.mEquipIconItem = CommonIconItem.Create(base.gameObject, new Vector3(-47f, 82f, 0f), null, false, 1f, null);
     this.mLevel = GameUITools.FindUILabel("Level", base.gameObject);
     this.mLevelValue = GameUITools.FindUILabel("Value", this.mLevel.gameObject);
     this.mSubQuality = GameUITools.FindUILabel("SubQuality", base.gameObject);
     this.mSubQualityValue = GameUITools.FindUILabel("Value", this.mSubQuality.gameObject);
 }
Example #13
0
 private void CreateObjects()
 {
     this.mIconItem = base.gameObject.GetComponent<CommonIconItem>();
     CommonIconItem expr_17 = this.mIconItem;
     expr_17.OnIconClickEvent = (CommonIconItem.VoidCallBack)Delegate.Combine(expr_17.OnIconClickEvent, new CommonIconItem.VoidCallBack(this.OnIconClick));
 }
Example #14
0
 private void CreateObjects()
 {
     this.mAdd = GameUITools.RegisterClickEvent("Add", new UIEventListener.VoidDelegate(this.OnAddClick), base.gameObject).GetComponent<UISprite>();
     this.mIconItem = CommonIconItem.Create(base.gameObject, new Vector3(-43f, 43f, 0f), new CommonIconItem.VoidCallBack(this.OnAddClick), true, 0.9f, new CommonIconItem.VoidCallBack(this.OnMinusClick));
     this.mIconItem.IsVisible = false;
 }
Example #15
0
 private void CreateObjects()
 {
     this.mIconItem = base.gameObject.GetComponent<CommonIconItem>();
     this.mIconItem.SetNameStyle(4, UILabel.Overflow.ResizeHeight);
     this.mIconItem.ShowItemInfo = true;
 }