public static bool Bind(GameObject target, string hyperlink) { int num; if (string.IsNullOrEmpty(hyperlink)) { return(false); } char[] separator = new char[] { '|' }; string[] strArray = hyperlink.Split(separator); if (strArray.Length != 2) { return(false); } if (!int.TryParse(strArray[0], out num)) { return(false); } char[] chArray2 = new char[] { ',' }; string[] strArray2 = strArray[1].Split(chArray2); CUIEventScript component = target.GetComponent <CUIEventScript>(); stUIEventParams eventParams = new stUIEventParams(); COM_HYPERLINK_TYPE com_hyperlink_type = (COM_HYPERLINK_TYPE)num; if (com_hyperlink_type != COM_HYPERLINK_TYPE.COM_HYPERLINK_TYPE_GUILD_INVITE) { if (com_hyperlink_type != COM_HYPERLINK_TYPE.COM_HYPERLINK_TYPE_PREGUILD_INVITE) { return(false); } } else { if (strArray2.Length != 4) { return(false); } ulong num3 = ulong.Parse(strArray2[0]); int num4 = int.Parse(strArray2[1]); ulong num5 = ulong.Parse(strArray2[2]); int num6 = int.Parse(strArray2[3]); eventParams.commonUInt64Param1 = num3; eventParams.tag = num4; eventParams.commonUInt64Param2 = num5; eventParams.tag2 = num6; component.SetUIEvent(enUIEventType.Click, enUIEventID.Guild_Hyperlink_Search_Guild, eventParams); return(true); } if (strArray2.Length != 1) { return(false); } ulong num8 = ulong.Parse(strArray2[0]); eventParams.commonUInt64Param1 = num8; component.SetUIEvent(enUIEventType.Click, enUIEventID.Guild_Hyperlink_Search_PrepareGuild, eventParams); return(true); }
private void SetAchievementAwardTipsEvent(CUIEventScript eventScript, CUseable useable) { stUIEventParams eventParams = new stUIEventParams { iconUseable = useable, tag = 0 }; eventScript.SetUIEvent(enUIEventType.Down, enUIEventID.Tips_ItemInfoOpen, eventParams); eventScript.SetUIEvent(enUIEventType.HoldEnd, enUIEventID.Tips_ItemInfoClose, eventParams); eventScript.SetUIEvent(enUIEventType.Click, enUIEventID.Tips_ItemInfoClose, eventParams); eventScript.SetUIEvent(enUIEventType.DragEnd, enUIEventID.Tips_ItemInfoClose, eventParams); }
public static void RefreshDianQuanPayButton(bool notifyFromSvr = false) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(FORM_PATH); if (form != null) { CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); GameObject gameObject = form.transform.Find("DiamondPayBtn").gameObject; CUIEventScript component = gameObject.GetComponent <CUIEventScript>(); CTextManager instance = Singleton <CTextManager> .GetInstance(); if (!masterRoleInfo.IsGuidedStateSet(0x16)) { CUICommonSystem.SetButtonName(gameObject, instance.GetText("Pay_Btn_FirstPay")); component.SetUIEvent(enUIEventType.Click, enUIEventID.Pay_OpenFirstPayPanel); CUICommonSystem.DelRedDot(gameObject); } else if (!masterRoleInfo.IsGuidedStateSet(0x17)) { CUICommonSystem.SetButtonName(gameObject, instance.GetText("Pay_Btn_FirstPay")); component.SetUIEvent(enUIEventType.Click, enUIEventID.Pay_OpenFirstPayPanel); CUICommonSystem.AddRedDot(gameObject, enRedDotPos.enTopRight, 0); } else if (!masterRoleInfo.IsGuidedStateSet(0x18)) { CUICommonSystem.SetButtonName(gameObject, instance.GetText("Pay_Btn_Renewal")); component.SetUIEvent(enUIEventType.Click, enUIEventID.Pay_OpenRenewalPanel); CUICommonSystem.DelRedDot(gameObject); } else if (!masterRoleInfo.IsGuidedStateSet(0x19)) { CUICommonSystem.SetButtonName(gameObject, instance.GetText("Pay_Btn_Renewal")); component.SetUIEvent(enUIEventType.Click, enUIEventID.Pay_OpenRenewalPanel); CUICommonSystem.AddRedDot(gameObject, enRedDotPos.enTopRight, 0); } else if (masterRoleInfo.IsClientBitsSet(0)) { CUICommonSystem.SetButtonName(gameObject, instance.GetText("GotoTehuiShopName")); component.SetUIEvent(enUIEventType.Click, enUIEventID.Pay_TehuiShop); } else if (notifyFromSvr) { masterRoleInfo.SetClientBits(0, true, false); RefreshDianQuanPayButton(false); } else { gameObject.CustomSetActive(false); } } }
public void Draw() { CUIListScript component = this.m_cuiForm.GetWidget(0).GetComponent <CUIListScript>(); int[] numArray = new int[] { 100, 200, 300, 400, 500, 600 }; component.SetElementAmount(numArray.Length); for (byte i = 0; i < numArray.Length; i = (byte)(i + 1)) { CUIListElementScript elemenet = component.GetElemenet(i); CUIEventScript script3 = elemenet.gameObject.GetComponent <CUIEventScript>(); if (script3 == null) { script3 = elemenet.gameObject.AddComponent <CUIEventScript>(); script3.Initialize(elemenet.m_belongedFormScript); } stUIEventParams eventParams = new stUIEventParams(); int num2 = numArray[i] / 10; eventParams.tag = numArray[i]; script3.SetUIEvent(enUIEventType.Click, enUIEventID.Purchase_BuyDiamond, eventParams); Text text = elemenet.gameObject.transform.Find("pnlPrice/txtQuantity").GetComponent <Text>(); Text text2 = elemenet.gameObject.transform.Find("pnlPrice/txtPrice").GetComponent <Text>(); text.text = numArray[i].ToString(); text2.text = num2.ToString(); } }
public static void RefreshSymbolItem(ResSymbolInfo symbolInfo, GameObject widget, CUIFormScript form) { if ((symbolInfo != null) && (widget != null)) { CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo != null) { CUseable useableByBaseID = masterRoleInfo.GetUseableContainer(enCONTAINER_TYPE.ITEM).GetUseableByBaseID(COM_ITEM_TYPE.COM_OBJTYPE_ITEMSYMBOL, symbolInfo.dwID); Image component = widget.transform.Find("iconImage").GetComponent <Image>(); Text text = widget.transform.Find("countText").GetComponent <Text>(); Text text2 = widget.transform.Find("nameText").GetComponent <Text>(); Text text3 = widget.transform.Find("descText").GetComponent <Text>(); component.SetSprite(string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Icon_Dir, symbolInfo.dwIcon), form, true, false, false); text.text = (useableByBaseID == null) ? string.Empty : useableByBaseID.m_stackCount.ToString(); text2.text = symbolInfo.szName; text3.text = CSymbolSystem.GetSymbolAttString(symbolInfo.dwID, true); CUIEventScript script = widget.GetComponent <CUIEventScript>(); if (script != null) { stUIEventParams eventParams = new stUIEventParams(); eventParams.symbolTransParam.symbolCfgInfo = symbolInfo; script.SetUIEvent(enUIEventType.Click, enUIEventID.SymbolMake_ListItemClick, eventParams); } if (useableByBaseID != null) { CUICommonSystem.PlayAnimator(widget, "Symbol_Normal"); } else { CUICommonSystem.PlayAnimator(widget, "Symbol_Disabled"); } } } }
private void OnBreakListItemEnable(CUIEvent uiEvent) { if (((this.m_breakDetailIndex >= 0) && (this.m_breakDetailIndex < this.m_breakSymbolList.Length)) && ((this.m_breakSymbolList[this.m_breakDetailIndex] != null) && (null != uiEvent.m_srcWidget))) { int srcWidgetIndexInBelongedList = uiEvent.m_srcWidgetIndexInBelongedList; if ((srcWidgetIndexInBelongedList >= 0) && (srcWidgetIndexInBelongedList < this.m_breakSymbolList[this.m_breakDetailIndex].Count)) { CBreakSymbolItem item = this.m_breakSymbolList[this.m_breakDetailIndex][srcWidgetIndexInBelongedList]; if ((item != null) && (item.symbol != null)) { Transform transform = uiEvent.m_srcWidget.transform.Find("itemCell"); this.m_symbolSys.m_symbolWearCtrl.SetSymbolListItem(uiEvent.m_srcFormScript, transform.gameObject, item.symbol); Transform transform2 = transform.Find("selectFlag"); if (transform2 != null) { CUIEventScript component = transform2.GetComponent <CUIEventScript>(); if (component != null) { stUIEventParams eventParams = new stUIEventParams { tag = srcWidgetIndexInBelongedList }; component.SetUIEvent(enUIEventType.Click, enUIEventID.Symbol_BreakListItemSelToggle, eventParams); } transform2.GetComponent <Toggle>().isOn = item.bBreakToggle; } } } } }
private void CreateHeroPreview(uint heroId, int i) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(HeroChooseLogic.s_heroInitChooseFormPath); if (form == null) { return; } string name = string.Format("RawImage{0}", i); GameObject gameObject = form.transform.Find(name).gameObject; CUIRawImageScript component = gameObject.GetComponent <CUIRawImageScript>(); ObjData hero3DObj = CUICommonSystem.GetHero3DObj(heroId, true); if (hero3DObj.Object == null) { return; } component.AddGameObject(name, hero3DObj.Object, Vector3.zero, Quaternion.identity, hero3DObj.Object.transform.localScale); this.cacheObjList.Add(hero3DObj.Object); CUIEventScript cUIEventScript = gameObject.GetComponent <CUIEventScript>(); if (cUIEventScript == null) { cUIEventScript = gameObject.AddComponent <CUIEventScript>(); cUIEventScript.Initialize(form); } cUIEventScript.SetUIEvent(enUIEventType.Click, enUIEventID.Hero_Init_Select, new stUIEventParams { heroId = heroId }); }
private void CreateHeroPreview(uint heroId, int i) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(s_heroInitChooseFormPath); if (form != null) { string name = string.Format("RawImage{0}", i); GameObject gameObject = form.transform.Find(name).gameObject; CUIRawImageScript component = gameObject.GetComponent <CUIRawImageScript>(); ObjData data = CUICommonSystem.GetHero3DObj(heroId, true); if (data.Object != null) { component.AddGameObject(name, data.Object, Vector3.zero, Quaternion.identity, data.Object.transform.localScale); this.cacheObjList.Add(data.Object); CUIEventScript script3 = gameObject.GetComponent <CUIEventScript>(); if (script3 == null) { script3 = gameObject.AddComponent <CUIEventScript>(); script3.Initialize(form); } stUIEventParams eventParams = new stUIEventParams { heroId = heroId }; script3.SetUIEvent(enUIEventType.Click, enUIEventID.Hero_Init_Select, eventParams); } } }
private void refreshButtonState(int timeToBuy) { if (this.m_FormScript == null) { return; } GameObject gameObject = this.m_FormScript.transform.Find("Bg/Bg1/ButtonGroup/Button_BuyTen").gameObject; CUIEventScript cUIEventScript = gameObject.GetComponent <CUIEventScript>(); stUIEventParams eventParams = default(stUIEventParams); if (cUIEventScript == null) { cUIEventScript = gameObject.AddComponent <CUIEventScript>(); cUIEventScript.Initialize(this.m_FormScript); } if (base.IsHaveEnoughTimes(timeToBuy)) { gameObject.GetComponent <Image>().color = new Color(1f, 1f, 1f, 1f); eventParams.tag = 1; } else { gameObject.GetComponent <Image>().color = new Color(0f, 1f, 1f, 1f); eventParams.tag = 0; } cUIEventScript.SetUIEvent(enUIEventType.Click, enUIEventID.Purchase_BuyCoinTen, eventParams); }
public static void TryToValidate(enOpPurpose purpose, enUIEventID confirmEventID, stUIEventParams confirmEventParams = default(stUIEventParams)) { CSecurePwdSystem instance = Singleton <CSecurePwdSystem> .GetInstance(); if (instance.EnableStatus == PwdStatus.Enable) { CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(CSecurePwdSystem.sValidatePwdFormPath, false, true); if (cUIFormScript == null) { return; } Transform transform = cUIFormScript.transform.Find("pnlBg/Panel_Main/BtnConfirm"); Transform transform2 = cUIFormScript.transform.Find("pnlBg/Panel_Main/BtnCancel"); if (transform == null || transform2 == null) { return; } CUIEventScript component = transform.GetComponent <CUIEventScript>(); CUIEventScript component2 = transform2.GetComponent <CUIEventScript>(); if (component == null || component2 == null) { return; } confirmEventParams.srcUIEventID = confirmEventID; component.SetUIEvent(enUIEventType.Up, enUIEventID.SecurePwd_OnValidateConfirm, confirmEventParams); } else { confirmEventParams.srcUIEventID = confirmEventID; string text = Singleton <CTextManager> .GetInstance().GetText(CSecurePwdSystem.s_OpRiskNameKeys[(int)purpose]); Singleton <CUIManager> .GetInstance().OpenMessageBoxWithCancel(text, enUIEventID.SecurePwd_OnValidateConfirm, enUIEventID.SecurePwd_OpenSetPwdForm, confirmEventParams, "暂时不用", "前往设置", true); } }
public static void RefreshSymbolItem(ResSymbolInfo symbolInfo, GameObject widget, CUIFormScript form, enSymbolMakeSource source = enSymbolMakeSource.SymbolManage) { if (symbolInfo == null || widget == null) { return; } CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo == null) { return; } CUseableContainer useableContainer = masterRoleInfo.GetUseableContainer(enCONTAINER_TYPE.ITEM); CUseable useableByBaseID = useableContainer.GetUseableByBaseID(5, symbolInfo.dwID); Image component = widget.transform.Find("iconImage").GetComponent <Image>(); Text component2 = widget.transform.Find("countText").GetComponent <Text>(); Text component3 = widget.transform.Find("nameText").GetComponent <Text>(); Text component4 = widget.transform.Find("descText").GetComponent <Text>(); Transform transform = widget.transform.Find("Price"); if (transform != null) { Text componetInChild = Utility.GetComponetInChild <Text>(transform.gameObject, "Text"); if (componetInChild != null) { componetInChild.text = symbolInfo.dwMakeCoin.ToString(); } CUIEventScript component5 = transform.GetComponent <CUIEventScript>(); if (component5 != null) { stUIEventParams eventParams = default(stUIEventParams); eventParams.symbolTransParam.symbolCfgInfo = symbolInfo; component5.SetUIEvent(enUIEventType.Click, enUIEventID.SymbolMake_ListItemClick, eventParams); } } component.SetSprite(string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Icon_Dir, symbolInfo.dwIcon), form, true, false, false, false); component2.text = ((useableByBaseID == null) ? "0" : useableByBaseID.m_stackCount.ToString()); component3.text = symbolInfo.szName; component4.text = CSymbolSystem.GetSymbolAttString(symbolInfo.dwID, true); CUIEventScript component6 = widget.GetComponent <CUIEventScript>(); if (component6 != null) { stUIEventParams eventParams2 = default(stUIEventParams); eventParams2.symbolTransParam.symbolCfgInfo = symbolInfo; component6.SetUIEvent(enUIEventType.Click, enUIEventID.SymbolMake_ListItemClick, eventParams2); } if (source == enSymbolMakeSource.Mall) { CUICommonSystem.PlayAnimator(widget, "Symbol_Normal"); } else if (useableByBaseID != null) { CUICommonSystem.PlayAnimator(widget, "Symbol_Normal"); } else { CUICommonSystem.PlayAnimator(widget, "Symbol_Disabled"); } }
public static void SetPveHeroItemData(CUIFormScript formScript, GameObject listItem, IHeroData data) { if (listItem == null || data == null) { return; } bool bPlayerOwn = data.bPlayerOwn; Transform transform = listItem.transform; Transform transform2 = transform.Find("heroProficiencyImg"); Transform transform3 = transform.Find("heroProficiencyBgImg"); CUICommonSystem.SetHeroProficiencyIconImage(formScript, transform2.gameObject, (int)data.proficiencyLV); CUICommonSystem.SetHeroProficiencyBgImage(formScript, transform3.gameObject, (int)data.proficiencyLV, false); CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo != null) { transform3.GetComponent <Image>().color = ((!masterRoleInfo.IsHaveHero(data.cfgID, true)) ? CUIUtility.s_Color_GrayShader : Color.white); transform2.GetComponent <Image>().color = ((!masterRoleInfo.IsHaveHero(data.cfgID, true)) ? CUIUtility.s_Color_GrayShader : Color.white); } bool flag = false; bool flag2 = false; if (masterRoleInfo != null) { flag = masterRoleInfo.IsFreeHero(data.cfgID); flag2 = masterRoleInfo.IsCreditFreeHero(data.cfgID); bool flag3 = masterRoleInfo.IsValidExperienceHero(data.cfgID); CUICommonSystem.SetHeroItemImage(formScript, listItem, masterRoleInfo.GetHeroSkinPic(data.cfgID), enHeroHeadType.enBust, !bPlayerOwn && !flag && !flag3, true); } GameObject gameObject = transform.Find("profession").gameObject; CUICommonSystem.SetHeroJob(formScript, gameObject, (enHeroJobType)data.heroType); Text component = transform.Find("heroNameText").GetComponent <Text>(); component.text = data.heroName; Transform transform4 = transform.Find("TxtFree"); Transform transform5 = transform.Find("TxtCreditFree"); if (transform4 != null) { transform4.gameObject.CustomSetActive(flag && !flag2); } if (transform5 != null) { transform5.gameObject.CustomSetActive(flag2); } GameObject gameObject2 = transform.Find("imgExperienceMark").gameObject; gameObject2.CustomSetActive(data.IsValidExperienceHero()); CUIEventScript component2 = listItem.GetComponent <CUIEventScript>(); stUIEventParams eventParams = default(stUIEventParams); eventParams.openHeroFormPar.heroId = data.cfgID; eventParams.openHeroFormPar.openSrc = enHeroFormOpenSrc.HeroListClick; component2.SetUIEvent(enUIEventType.Click, enUIEventID.HeroInfo_OpenForm, eventParams); }
public void SwitchToSymbolMakePanel(CUIEvent uiEvent) { this.ClearSymbolMakeData(); this.RefreshSymbolMakeForm(); CSymbolSystem.RefreshSymbolCntText(); CUseable useable = CUseableManager.CreateVirtualUseable(enVirtualItemType.enSymbolCoin, 0); stUIEventParams eventParams = new stUIEventParams { iconUseable = useable, tag = 3 }; CUIEventScript component = uiEvent.m_srcFormScript.GetWidget(8).GetComponent <CUIEventScript>(); if (component != null) { component.SetUIEvent(enUIEventType.Down, enUIEventID.Tips_ItemInfoOpen, eventParams); component.SetUIEvent(enUIEventType.HoldEnd, enUIEventID.Tips_ItemInfoClose, eventParams); component.SetUIEvent(enUIEventType.Click, enUIEventID.Tips_ItemInfoClose, eventParams); component.SetUIEvent(enUIEventType.DragEnd, enUIEventID.Tips_ItemInfoClose, eventParams); } }
private void OnShowGiveFriendSkin(uint heroId, uint skinId, uint price) { ResHeroSkin heroSkin = CSkinInfo.GetHeroSkin(heroId, skinId); if (heroSkin == null) { return; } CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(string.Format("{0}{1}", "UGUI/Form/System/", "Mall/Form_GiveHeroSkin_3D.prefab"), false, true); Text component = cUIFormScript.transform.Find("Panel/skinNameText").GetComponent <Text>(); component.set_text(heroSkin.szSkinName); GameObject gameObject = cUIFormScript.transform.Find("Panel/Panel_Prop/List_Prop").gameObject; CSkinInfo.GetHeroSkinProp(heroId, skinId, ref CHeroInfoSystem2.s_propArr, ref CHeroInfoSystem2.s_propPctArr, ref CHeroInfoSystem2.s_propImgArr); CUICommonSystem.SetListProp(gameObject, ref CHeroInfoSystem2.s_propArr, ref CHeroInfoSystem2.s_propPctArr); Text component2 = cUIFormScript.transform.Find("Panel/pricePanel/priceText").GetComponent <Text>(); component2.set_text(price.ToString()); CUIEventScript component3 = cUIFormScript.transform.Find("Panel/BtnGroup/buyButton").gameObject.GetComponent <CUIEventScript>(); stUIEventParams eventParams = default(stUIEventParams); eventParams.heroSkinParam.heroId = heroId; eventParams.heroSkinParam.skinId = skinId; eventParams.heroSkinParam.isCanCharge = true; eventParams.commonUInt64Param1 = this._curFriendUid; eventParams.commonBool = this._curFriendIsSns; eventParams.commonUInt32Param1 = this._curWorldId; component3.SetUIEvent(enUIEventType.Click, enUIEventID.HeroSkin_OpenBuyHeroSkinForFriend, eventParams); CUI3DImageScript component4 = cUIFormScript.transform.Find("Panel/3DImage").gameObject.GetComponent <CUI3DImageScript>(); ObjNameData heroPrefabPath = CUICommonSystem.GetHeroPrefabPath(heroId, (int)skinId, true); GameObject gameObject2 = component4.AddGameObject(heroPrefabPath.ObjectName, false, false); if (gameObject2 != null) { if (heroPrefabPath.ActorInfo != null) { gameObject2.transform.localScale = new Vector3(heroPrefabPath.ActorInfo.LobbyScale, heroPrefabPath.ActorInfo.LobbyScale, heroPrefabPath.ActorInfo.LobbyScale); } DynamicShadow.EnableDynamicShow(component4.gameObject, true); CHeroAnimaSystem instance = Singleton <CHeroAnimaSystem> .GetInstance(); instance.Set3DModel(gameObject2); instance.InitAnimatList(); instance.InitAnimatSoundList(heroId, skinId); instance.OnModePlayAnima("Come"); } }
public void RefreshBuyDianQuanPanel() { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(s_buyDianQuanFormPath); if (form != null) { DatabinTable <ResCouponsBuyInfo, uint> androidDianQuanBuyInfo = null; androidDianQuanBuyInfo = GameDataMgr.androidDianQuanBuyInfo; int index = 0; this.dianQuanBuyInfoList.Clear(); androidDianQuanBuyInfo.Accept(x => this.dianQuanBuyInfoList.Add(x)); this.SortDianQuanInfoList(); CUIListScript component = form.transform.Find("pnlBg/pnlBody/List").GetComponent <CUIListScript>(); component.SetElementAmount(this.dianQuanBuyInfoList.Count); for (index = 0; index < this.dianQuanBuyInfoList.Count; index++) { ResCouponsBuyInfo info = this.dianQuanBuyInfoList[index]; CUIListElementScript elemenet = component.GetElemenet(index); Image image = elemenet.transform.Find("imgIcon").GetComponent <Image>(); string prefabPath = string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Purchase_Dir, StringHelper.UTF8BytesToString(ref info.szImgPath)); image.SetSprite(prefabPath, form, true, false, false); elemenet.transform.Find("diamondCntText").GetComponent <Text>().text = string.Format(Singleton <CTextManager> .GetInstance().GetText("Pay_DianQuan_Cnt"), info.dwBuyCount); GameObject gameObject = elemenet.transform.Find("buyPanel/buyBtn").gameObject; gameObject.transform.Find("Text").GetComponent <Text>().text = string.Format(Singleton <CTextManager> .GetInstance().GetText("Pay_DianQuan_Price"), info.dwBuyPrice); GameObject obj3 = elemenet.transform.Find("additionPanel").gameObject; obj3.CustomSetActive(false); GameObject obj4 = elemenet.transform.Find("pnlRecommend").gameObject; if ((info.bFirstGift > 0) && !this.IsDianQuanHaveFirstPay(info.dwID)) { obj4.CustomSetActive(true); obj4.transform.Find("txtDiscount").GetComponent <Text>().text = Singleton <CTextManager> .GetInstance().GetText("Pay_First_Pay_Double"); } else { if (info.dwExtraGiftCnt > 0) { obj3.CustomSetActive(true); obj3.transform.Find("Text").GetComponent <Text>().text = string.Format(Singleton <CTextManager> .GetInstance().GetText("Pay_Gift_Diamond_Cnt"), info.dwExtraGiftCnt); } obj4.CustomSetActive(false); } CUIEventScript script4 = gameObject.GetComponent <CUIEventScript>(); stUIEventParams eventParams = new stUIEventParams(); eventParams.dianQuanBuyPar.giftId = (int)info.dwID; eventParams.dianQuanBuyPar.dianQuanCnt = (int)info.dwBuyCount; script4.SetUIEvent(enUIEventType.Click, enUIEventID.Pay_ClickDianQuanGift, eventParams); } } }
public void OpenBuyDianQuanPanel(CUIEvent uiEvent) { if (this.IsOpenPaySys()) { Singleton <CChatController> .GetInstance().ShowPanel(true, false); CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(CPaySystem.s_buyDianQuanFormPath, false, true); if (cUIFormScript == null) { return; } GameObject obj = cUIFormScript.m_formWidgets[0]; GameObject gameObject = cUIFormScript.m_formWidgets[1]; if (NetworkAccelerator.IsCommercialized()) { obj.CustomSetActive(false); gameObject.CustomSetActive(true); if (CUIRedDotSystem.IsShowRedDotByVersion(enRedID.Lobby_PayEntry)) { CUIRedDotSystem.AddRedDot(gameObject, enRedDotPos.enTopRight, 0, 0, 0); } } else { obj.CustomSetActive(CTongCaiSys.IsShowBuyTongCaiBtn()); gameObject.CustomSetActive(false); } Singleton <CTopLobbyEntry> .GetInstance().OpenForm(); this.RefreshBuyDianQuanPanel(); MonoSingleton <NobeSys> .GetInstance().ShowNobeTipsInDiamond(); if (uiEvent.m_eventID != enUIEventID.Pay_OpenBuyDianQuanPanelWithLobby) { Transform transform = cUIFormScript.transform.Find("bg/btnClose"); if (transform) { CUIEventScript component = transform.GetComponent <CUIEventScript>(); if (component != null) { component.SetUIEvent(enUIEventType.Click, enUIEventID.None); component.m_closeFormWhenClicked = true; } } } } }
private void OnBreakExcessSymbolClick(CUIEvent uiEvent) { CUIFormScript script = Singleton <CUIManager> .GetInstance().OpenForm(s_symbolBreakPath, false, true); if (script != null) { for (int i = 0; i < this.m_breakSymbolList.Length; i++) { this.m_breakSymbolList[i].Clear(); } this.m_breakLevelMask = 0; Transform transform = script.transform.Find("Panel_SymbolBreak/Panel_Content"); for (int j = 0; j < s_maxSymbolBreakLevel; j++) { GameObject gameObject = transform.Find(string.Format("breakElement{0}", j)).gameObject; Transform transform2 = gameObject.transform.Find("OnBreakBtn"); Transform transform3 = gameObject.transform.Find("OnBreakBtn/Checkmark"); Transform transform4 = gameObject.transform.Find("detailButton"); if ((transform2 != null) && (transform3 != null)) { transform3.gameObject.CustomSetActive(false); CUIEventScript component = transform2.GetComponent <CUIEventScript>(); if (component != null) { stUIEventParams eventParams = new stUIEventParams { tag = j }; component.SetUIEvent(enUIEventType.Click, enUIEventID.SymbolMake_SelectBreakLvlItem, eventParams); } } if (transform4 != null) { transform4.gameObject.CustomSetActive(false); CUIEventScript script3 = transform4.GetComponent <CUIEventScript>(); if (script3 != null) { stUIEventParams params2 = new stUIEventParams { tag = j }; script3.SetUIEvent(enUIEventType.Click, enUIEventID.Symbol_OpenBreakDetailForm, params2); } } } this.RefreshSymbolBreakForm(); } }
public static void OnHeroItemEnable(CUIEvent uiEvent, ResHeroCfgInfo heroCfgInfo) { if ((heroCfgInfo != null) && (uiEvent.m_srcWidget != null)) { GameObject item = Utility.FindChild(uiEvent.m_srcWidget, "heroItemCell"); if (item != null) { CUICommonSystem.SetHeroItemImage(uiEvent.m_srcFormScript, item, heroCfgInfo.szImagePath, enHeroHeadType.enIcon, false); CUIEventScript component = item.GetComponent <CUIEventScript>(); if (component != null) { stUIEventParams eventParams = new stUIEventParams { heroId = heroCfgInfo.dwCfgID }; component.SetUIEvent(enUIEventType.Click, enUIEventID.Ranking_HeroChg_Hero_Click, eventParams); } Utility.FindChild(item, "TxtFree").CustomSetActive(false); Utility.FindChild(item, "equipedPanel").CustomSetActive(false); } } }
private void OnHeroListElementEnable(CUIEvent uiEvent) { int srcWidgetIndexInBelongedList = uiEvent.m_srcWidgetIndexInBelongedList; if (srcWidgetIndexInBelongedList < 0 || srcWidgetIndexInBelongedList >= this.m_heroList.get_Count()) { return; } CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); DebugHelper.Assert(masterRoleInfo != null, "CSymbolRcmdCtrl OnHeroListElementEnable role is null"); if (masterRoleInfo == null || masterRoleInfo.m_customRecommendEquipDictionary == null) { return; } ResHeroCfgInfo resHeroCfgInfo = this.m_heroList.get_Item(srcWidgetIndexInBelongedList); if (resHeroCfgInfo != null && uiEvent.m_srcWidget != null) { Transform transform = uiEvent.m_srcWidget.transform.Find("heroItemCell"); if (transform != null) { CUICommonSystem.SetHeroItemImage(uiEvent.m_srcFormScript, transform.gameObject, resHeroCfgInfo.szImagePath, enHeroHeadType.enIcon, !masterRoleInfo.IsHaveHero(resHeroCfgInfo.dwCfgID, false), false); CUIEventScript component = transform.GetComponent <CUIEventScript>(); if (component != null) { component.SetUIEvent(enUIEventType.Click, enUIEventID.SymbolRcmd_HeroListItemClick, new stUIEventParams { heroId = resHeroCfgInfo.dwCfgID }); } Transform transform2 = transform.Find("TxtFree"); if (transform2 != null) { transform2.gameObject.CustomSetActive(masterRoleInfo.IsFreeHero(resHeroCfgInfo.dwCfgID)); } } } }
public static void OnHeroItemEnable(CUIEvent uiEvent, ResHeroCfgInfo heroCfgInfo) { if (heroCfgInfo != null && uiEvent.m_srcWidget != null) { GameObject gameObject = Utility.FindChild(uiEvent.m_srcWidget, "heroItemCell"); if (gameObject != null) { CUICommonSystem.SetHeroItemImage(uiEvent.m_srcFormScript, gameObject, heroCfgInfo.szImagePath, enHeroHeadType.enIcon, false, false); CUIEventScript component = gameObject.GetComponent <CUIEventScript>(); if (component != null) { component.SetUIEvent(enUIEventType.Click, enUIEventID.Ranking_HeroChg_Hero_Click, new stUIEventParams { heroId = heroCfgInfo.dwCfgID }); } GameObject obj = Utility.FindChild(gameObject, "TxtFree"); obj.CustomSetActive(false); GameObject obj2 = Utility.FindChild(gameObject, "equipedPanel"); obj2.CustomSetActive(false); } } }
public static void SetAddNodeActive(GameObject addnode, CFriendModel.FriendType friendType, bool ifGrey = false) { if (addnode != null) { addnode.CustomSetActive(true); Transform transform = addnode.transform.Find("add_btn"); if (transform != null) { GameObject gameObject = transform.gameObject; if (gameObject != null) { gameObject.CustomSetActive(!ifGrey); stUIEventParams eventParams = default(stUIEventParams); eventParams.tag = (int)friendType; CUIEventScript component = gameObject.GetComponent <CUIEventScript>(); if (component != null) { component.SetUIEvent(enUIEventType.Click, enUIEventID.Friend_RequestBeFriend, eventParams); } } } } }
public void Draw() { CUIListScript component = this.m_cuiForm.GetWidget(0).GetComponent <CUIListScript>(); int[] array = new int[] { 100, 200, 300, 400, 500, 600 }; component.SetElementAmount(array.Length); byte b = 0; while ((int)b < array.Length) { CUIListElementScript elemenet = component.GetElemenet((int)b); CUIEventScript cUIEventScript = elemenet.gameObject.GetComponent <CUIEventScript>(); if (cUIEventScript == null) { cUIEventScript = elemenet.gameObject.AddComponent <CUIEventScript>(); cUIEventScript.Initialize(elemenet.m_belongedFormScript); } stUIEventParams eventParams = default(stUIEventParams); int num = array[(int)b] / 10; eventParams.tag = array[(int)b]; cUIEventScript.SetUIEvent(enUIEventType.Click, enUIEventID.Purchase_BuyDiamond, eventParams); Text component2 = elemenet.gameObject.transform.Find("pnlPrice/txtQuantity").GetComponent <Text>(); Text component3 = elemenet.gameObject.transform.Find("pnlPrice/txtPrice").GetComponent <Text>(); component2.set_text(array[(int)b].ToString()); component3.set_text(num.ToString()); b += 1; } }
public void RefreshBuyDianQuanPanel() { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CPaySystem.s_buyDianQuanFormPath); if (form == null) { return; } DatabinTable <ResCouponsBuyInfo, uint> androidDianQuanBuyInfo = GameDataMgr.androidDianQuanBuyInfo; this.dianQuanBuyInfoList.Clear(); androidDianQuanBuyInfo.Accept(delegate(ResCouponsBuyInfo x) { this.dianQuanBuyInfoList.Add(x); }); this.SortDianQuanInfoList(); CUIListScript component = form.transform.Find("pnlBg/pnlBody/List").GetComponent <CUIListScript>(); component.SetElementAmount(this.dianQuanBuyInfoList.Count); for (int i = 0; i < this.dianQuanBuyInfoList.Count; i++) { ResCouponsBuyInfo resCouponsBuyInfo = this.dianQuanBuyInfoList[i]; CUIListElementScript elemenet = component.GetElemenet(i); Image component2 = elemenet.transform.Find("imgIcon").GetComponent <Image>(); string prefabPath = string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Purchase_Dir, StringHelper.UTF8BytesToString(ref resCouponsBuyInfo.szImgPath)); component2.SetSprite(prefabPath, form, true, false, false, false); Text component3 = elemenet.transform.Find("diamondCntText").GetComponent <Text>(); component3.set_text(string.Format(Singleton <CTextManager> .GetInstance().GetText("Pay_DianQuan_Cnt"), resCouponsBuyInfo.dwBuyCount)); GameObject gameObject = elemenet.transform.Find("buyPanel/buyBtn").gameObject; Text component4 = gameObject.transform.Find("Text").GetComponent <Text>(); component4.set_text(string.Format(Singleton <CTextManager> .GetInstance().GetText("Pay_DianQuan_Price"), resCouponsBuyInfo.dwBuyPrice)); GameObject gameObject2 = elemenet.transform.Find("additionPanel").gameObject; gameObject2.CustomSetActive(false); GameObject gameObject3 = elemenet.transform.Find("pnlRecommend").gameObject; if (resCouponsBuyInfo.bFirstGift > 0 && !this.IsDianQuanHaveFirstPay(resCouponsBuyInfo.dwID)) { gameObject3.CustomSetActive(true); Text component5 = gameObject3.transform.Find("txtDiscount").GetComponent <Text>(); component5.set_text(Singleton <CTextManager> .GetInstance().GetText("Pay_First_Pay_Double")); } else { if (resCouponsBuyInfo.dwExtraGiftCnt > 0u) { gameObject2.CustomSetActive(true); Text component6 = gameObject2.transform.Find("Text").GetComponent <Text>(); component6.set_text(string.Format(Singleton <CTextManager> .GetInstance().GetText("Pay_Gift_Diamond_Cnt"), resCouponsBuyInfo.dwExtraGiftCnt)); } gameObject3.CustomSetActive(false); } CUIEventScript component7 = gameObject.GetComponent <CUIEventScript>(); stUIEventParams eventParams = default(stUIEventParams); eventParams.dianQuanBuyPar.giftId = (int)resCouponsBuyInfo.dwID; eventParams.dianQuanBuyPar.dianQuanCnt = (int)resCouponsBuyInfo.dwBuyCount; component7.SetUIEvent(enUIEventType.Click, enUIEventID.Pay_ClickDianQuanGift, eventParams); } if (CSysDynamicBlock.bLobbyEntryBlocked) { Transform transform = form.transform.FindChild("Button_OpenNobe"); Transform transform2 = form.transform.FindChild("Button_HelpMe"); Transform transform3 = form.transform.FindChild("Button_TongCai"); Transform transform4 = form.transform.FindChild("Button_Partner"); if (transform) { transform.gameObject.CustomSetActive(false); } if (transform2) { transform2.gameObject.CustomSetActive(false); } if (transform3) { transform3.gameObject.CustomSetActive(false); } if (transform4) { transform4.gameObject.CustomSetActive(false); } } }
public static bool Bind(GameObject target, string hyperlink) { if (string.IsNullOrEmpty(hyperlink)) { return(false); } string[] array = hyperlink.Split(new char[] { '|' }); if (array.Length != 2) { return(false); } int num; if (!int.TryParse(array[0], ref num)) { return(false); } string[] array2 = array[1].Split(new char[] { ',' }); CUIEventScript component = target.GetComponent <CUIEventScript>(); stUIEventParams eventParams = default(stUIEventParams); switch (num) { case 1: { if (array2.Length != 4) { return(false); } ulong commonUInt64Param = ulong.Parse(array2[0]); int tag = int.Parse(array2[1]); ulong commonUInt64Param2 = ulong.Parse(array2[2]); int tag2 = int.Parse(array2[3]); eventParams.commonUInt64Param1 = commonUInt64Param; eventParams.tag = tag; eventParams.commonUInt64Param2 = commonUInt64Param2; eventParams.tag2 = tag2; component.SetUIEvent(enUIEventType.Click, enUIEventID.Guild_Hyperlink_Search_Guild, eventParams); Utility.GetComponetInChild <Text>(target, "Text").text = Singleton <CTextManager> .get_instance().GetText("Common_Check"); return(true); } case 2: { if (array2.Length != 1) { return(false); } ulong commonUInt64Param3 = ulong.Parse(array2[0]); eventParams.commonUInt64Param1 = commonUInt64Param3; component.SetUIEvent(enUIEventType.Click, enUIEventID.Guild_Hyperlink_Search_PrepareGuild, eventParams); Utility.GetComponetInChild <Text>(target, "Text").text = Singleton <CTextManager> .get_instance().GetText("Common_Check"); return(true); } case 3: { int tag3 = 0; if (int.TryParse(array2[0], ref tag3)) { eventParams.tag = tag3; component.SetUIEvent(enUIEventType.Click, enUIEventID.Mail_JumpForm, eventParams); if (array2.Length == 2) { Utility.GetComponetInChild <Text>(target, "Text").text = array2[1]; } else { Utility.GetComponetInChild <Text>(target, "Text").text = Singleton <CTextManager> .get_instance().GetText("Common_Check"); } return(true); } return(false); } case 4: eventParams.tagStr = array2[0]; component.SetUIEvent(enUIEventType.Click, enUIEventID.Mail_JumpUrl, eventParams); if (array2.Length == 2) { Utility.GetComponetInChild <Text>(target, "Text").text = array2[1]; } else { Utility.GetComponetInChild <Text>(target, "Text").text = Singleton <CTextManager> .get_instance().GetText("Common_Check"); } return(true); default: return(false); } }
private void UpdateItem(CUIEvent uiEvent, COMDT_AKALISHOP_GOODS productInfo) { if (productInfo == null) { return; } CUIFormScript srcFormScript = uiEvent.m_srcFormScript; GameObject srcWidget = uiEvent.m_srcWidget; if (srcFormScript == null || srcWidget == null) { return; } CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); DebugHelper.Assert(masterRoleInfo != null, "master roleInfo is null"); if (masterRoleInfo == null) { return; } GameObject gameObject = Utility.FindChild(srcWidget, "heroItem"); if (gameObject == null) { DebugHelper.Assert(gameObject != null, "hero item is null"); return; } GameObject gameObject2 = Utility.FindChild(srcWidget, "defualtItem"); if (gameObject2 != null) { gameObject2.CustomSetActive(false); } if (gameObject != null) { gameObject.CustomSetActive(true); } Text componetInChild = Utility.GetComponetInChild <Text>(gameObject, "heroDataPanel/heroNamePanel/heroNameText"); GameObject gameObject3 = Utility.FindChild(gameObject, "heroDataPanel/heroNamePanel/heroSkinText"); if (gameObject3 == null) { return; } Text component = gameObject3.GetComponent <Text>(); GameObject gameObject4 = Utility.FindChild(gameObject, "tag"); if (gameObject4 == null) { return; } GameObject gameObject5 = Utility.FindChild(gameObject, "profession"); if (gameObject5 == null) { return; } GameObject gameObject6 = Utility.FindChild(srcWidget, "imgExperienceMark"); if (gameObject6 == null) { return; } if (gameObject6) { gameObject6.CustomSetActive(true); } GameObject gameObject7 = Utility.FindChild(gameObject, "skinLabelImage"); if (gameObject7 == null) { return; } GameObject gameObject8 = Utility.FindChild(gameObject, "heroDataPanel/heroPricePanel"); if (gameObject8 == null) { return; } gameObject8.CustomSetActive(false); GameObject gameObject9 = Utility.FindChild(srcWidget, "ButtonGroup/BuyBtn"); if (gameObject9 == null) { return; } gameObject9.CustomSetActive(false); Text componetInChild2 = Utility.GetComponetInChild <Text>(gameObject9, "Text"); Button component2 = gameObject9.GetComponent <Button>(); if (component2 == null) { return; } CUIEventScript component3 = gameObject9.GetComponent <CUIEventScript>(); if (component3 == null) { return; } component3.enabled = false; component2.enabled = false; GameObject gameObject10 = Utility.FindChild(srcWidget, "ButtonGroup/LinkBtn"); if (gameObject10 == null) { return; } gameObject10.CustomSetActive(false); Text componetInChild3 = Utility.GetComponetInChild <Text>(gameObject10, "Text"); Button component4 = gameObject10.GetComponent <Button>(); if (component4 == null) { return; } CUIEventScript component5 = gameObject10.GetComponent <CUIEventScript>(); if (component5 == null) { return; } component5.enabled = false; component4.enabled = false; COM_ITEM_TYPE wItemType = (COM_ITEM_TYPE)productInfo.wItemType; uint dwItemID = productInfo.dwItemID; switch (wItemType) { case COM_ITEM_TYPE.COM_OBJTYPE_HERO: { ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(dwItemID); DebugHelper.Assert(dataByKey != null, "神秘商店配置的英雄ID有错,英雄表里不存在"); if (dataByKey == null) { return; } ResHeroShop resHeroShop = null; GameDataMgr.heroShopInfoDict.TryGetValue(dataByKey.dwCfgID, out resHeroShop); CUICommonSystem.SetHeroItemImage(uiEvent.m_srcFormScript, gameObject, StringHelper.UTF8BytesToString(ref dataByKey.szImagePath), enHeroHeadType.enBust, false, true); gameObject5.CustomSetActive(false); gameObject7.CustomSetActive(false); gameObject3.CustomSetActive(false); if (componetInChild != null) { componetInChild.set_text(StringHelper.UTF8BytesToString(ref dataByKey.szName)); } if (masterRoleInfo.IsHaveHero(dataByKey.dwCfgID, false)) { gameObject9.CustomSetActive(true); componetInChild2.set_text(Singleton <CTextManager> .GetInstance().GetText("Mall_Hero_State_Own")); gameObject4.CustomSetActive(false); gameObject6.CustomSetActive(false); } else { gameObject6.CustomSetActive(masterRoleInfo.IsValidExperienceHero(dataByKey.dwCfgID)); gameObject8.CustomSetActive(true); gameObject9.CustomSetActive(true); componetInChild2.set_text(Singleton <CTextManager> .GetInstance().GetText("Mall_Buy")); component3.enabled = true; component2.enabled = true; this.UpdateItemPricePnl(srcFormScript, gameObject8.transform, gameObject4.transform, productInfo); component3.SetUIEvent(enUIEventType.Click, enUIEventID.Mall_Mystery_On_Open_Buy_Form, new stUIEventParams { tag = uiEvent.m_srcWidgetIndexInBelongedList }); } break; } case COM_ITEM_TYPE.COM_OBJTYPE_HEROSKIN: { ResHeroSkin heroSkin = CSkinInfo.GetHeroSkin(dwItemID); DebugHelper.Assert(heroSkin != null, "神秘商店配置的皮肤ID有错,皮肤表里不存在"); if (heroSkin == null) { return; } ResHeroSkinShop resHeroSkinShop = null; GameDataMgr.skinShopInfoDict.TryGetValue(heroSkin.dwSkinID, out resHeroSkinShop); ResHeroCfgInfo dataByKey2 = GameDataMgr.heroDatabin.GetDataByKey(heroSkin.dwHeroID); DebugHelper.Assert(dataByKey2 != null, "神秘商店配置的皮肤ID有错,皮肤对应的英雄不存在"); if (dataByKey2 == null) { return; } CUICommonSystem.SetHeroItemImage(uiEvent.m_srcFormScript, gameObject.gameObject, heroSkin.szSkinPicID, enHeroHeadType.enBust, false, true); gameObject5.CustomSetActive(false); CUICommonSystem.SetHeroSkinLabelPic(uiEvent.m_srcFormScript, gameObject7, heroSkin.dwHeroID, heroSkin.dwSkinID); gameObject3.CustomSetActive(true); if (componetInChild != null) { componetInChild.set_text(StringHelper.UTF8BytesToString(ref dataByKey2.szName)); } if (component != null) { component.set_text(StringHelper.UTF8BytesToString(ref heroSkin.szSkinName)); } if (masterRoleInfo.IsHaveHeroSkin(heroSkin.dwHeroID, heroSkin.dwSkinID, false)) { gameObject9.CustomSetActive(true); componetInChild2.set_text(Singleton <CTextManager> .GetInstance().GetText("Mall_Skin_State_Own")); gameObject4.CustomSetActive(false); gameObject6.CustomSetActive(false); } else { gameObject6.CustomSetActive(masterRoleInfo.IsValidExperienceSkin(heroSkin.dwHeroID, heroSkin.dwSkinID)); gameObject8.CustomSetActive(true); gameObject10.CustomSetActive(false); this.UpdateItemPricePnl(srcFormScript, gameObject8.transform, gameObject4.transform, productInfo); if (masterRoleInfo.IsCanBuySkinButNotHaveHero(heroSkin.dwHeroID, heroSkin.dwSkinID)) { gameObject9.CustomSetActive(true); component3.enabled = true; componetInChild2.set_text(Singleton <CTextManager> .GetInstance().GetText("Mall_Skin_State_Buy_hero")); component2.enabled = true; stUIEventParams eventParams = default(stUIEventParams); eventParams.openHeroFormPar.heroId = heroSkin.dwHeroID; eventParams.openHeroFormPar.skinId = heroSkin.dwSkinID; eventParams.openHeroFormPar.openSrc = enHeroFormOpenSrc.SkinBuyClick; component3.SetUIEvent(enUIEventType.Click, enUIEventID.HeroInfo_OpenForm, eventParams); this.UpdateItemPricePnl(srcFormScript, gameObject8.transform, gameObject4.transform, productInfo); } else { gameObject10.CustomSetActive(false); gameObject9.CustomSetActive(true); componetInChild2.set_text(Singleton <CTextManager> .GetInstance().GetText("Mall_Buy")); component3.enabled = true; component2.enabled = true; component3.SetUIEvent(enUIEventType.Click, enUIEventID.Mall_Mystery_On_Open_Buy_Form, new stUIEventParams { tag = uiEvent.m_srcWidgetIndexInBelongedList }); } } break; } } }
public void Validate() { if (this.phase == null || this.uiItem == null) { return; } this.uiItem.CustomSetActive(true); ResDT_PointExchange config = this.phase.Config; PointsExchangeActivity pointsExchangeActivity = this.phase.Owner as PointsExchangeActivity; if (pointsExchangeActivity == null || pointsExchangeActivity.PointsConfig == null) { return; } ResWealPointExchange pointsConfig = pointsExchangeActivity.PointsConfig; GameObject gameObject = this.uiItem.transform.FindChild("DuihuanBtn").gameObject; gameObject.GetComponent <CUIEventScript>().m_onClickEventParams.commonUInt32Param1 = (uint)this.index; uint maxExchangeCount = pointsExchangeActivity.GetMaxExchangeCount(this.index); uint exchangeCount = pointsExchangeActivity.GetExchangeCount(this.index); uint dwPointCnt = config.dwPointCnt; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); uint jiFen = masterRoleInfo.JiFen; bool isEnable = jiFen >= dwPointCnt && (maxExchangeCount == 0u || exchangeCount < maxExchangeCount); if (this.owner.view.activity.timeState != Activity.TimeState.Going) { CUICommonSystem.SetButtonEnableWithShader(gameObject.GetComponent <Button>(), false, true); } else { CUICommonSystem.SetButtonEnableWithShader(gameObject.GetComponent <Button>(), isEnable, true); } CUseable itemUseable = CUseableManager.CreateVirtualUseable(enVirtualItemType.enDianJuanJiFen, 1); GameObject gameObject2 = this.uiItem.transform.FindChild("Panel/PointsCell").gameObject; CUICommonSystem.SetItemCell(this.owner.view.form.formScript, gameObject2, itemUseable, true, false, false, false); CUseable cUseable = CUseableManager.CreateUseable((COM_ITEM_TYPE)config.wResItemType, config.dwResItemID, (int)config.wResItemCnt); GameObject gameObject3 = this.uiItem.transform.FindChild("Panel/GetItemCell").gameObject; if (cUseable.m_type == COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP) { CItem cItem = cUseable as CItem; if (cItem != null && cItem.m_itemData.bIsView > 0) { CUICommonSystem.SetItemCell(this.owner.view.form.formScript, gameObject3, cUseable, true, false, false, true); } else { CUICommonSystem.SetItemCell(this.owner.view.form.formScript, gameObject3, cUseable, true, false, false, false); if (gameObject3 != null) { CUIEventScript component = gameObject3.GetComponent <CUIEventScript>(); if (component != null) { component.SetUIEvent(enUIEventType.Click, enUIEventID.None); } } } } else { CUICommonSystem.SetItemCell(this.owner.view.form.formScript, gameObject3, cUseable, true, false, false, false); if (gameObject3 != null) { CUIEventScript component2 = gameObject3.GetComponent <CUIEventScript>(); if (component2 != null) { component2.SetUIEvent(enUIEventType.Click, enUIEventID.None); } } } bool bActive = false; if (cUseable.m_type == COM_ITEM_TYPE.COM_OBJTYPE_HERO) { CHeroItem cHeroItem = (CHeroItem)cUseable; if (cHeroItem != null) { CRoleInfo masterRoleInfo2 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo2 != null) { bActive = masterRoleInfo2.IsHaveHero(cHeroItem.m_baseID, true); } } } else if (cUseable.m_type == COM_ITEM_TYPE.COM_OBJTYPE_HEROSKIN) { CHeroSkin cHeroSkin = (CHeroSkin)cUseable; if (cHeroSkin != null) { CRoleInfo masterRoleInfo3 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo3 != null) { bActive = masterRoleInfo3.IsHaveHeroSkin(cHeroSkin.m_heroId, cHeroSkin.m_skinId, false); } } } Transform transform = this.uiItem.transform.FindChild("Panel/GetItemCell/HaveItemFlag"); if (transform != null && transform.gameObject != null) { transform.gameObject.CustomSetActive(bActive); } Text component3 = this.uiItem.transform.FindChild("Panel/PointsCell/ItemCount").gameObject.GetComponent <Text>(); if (jiFen < config.dwPointCnt) { component3.set_text(string.Format(Singleton <CTextManager> .GetInstance().GetText("Exchange_ItemNotEnoughCount"), jiFen, dwPointCnt)); CUICommonSystem.SetButtonEnableWithShader(gameObject.GetComponent <Button>(), false, true); } else { component3.set_text(string.Format(Singleton <CTextManager> .GetInstance().GetText("Exchange_ItemCount"), jiFen, dwPointCnt)); } GameObject gameObject4 = this.uiItem.transform.FindChild("ExchangeCount").gameObject; if (maxExchangeCount > 0u) { gameObject4.CustomSetActive(true); gameObject4.GetComponent <Text>().set_text(string.Format(Singleton <CTextManager> .GetInstance().GetText("Exchange_TimeLimit"), exchangeCount, maxExchangeCount)); } else { gameObject4.CustomSetActive(false); } }
public static bool Bind(GameObject target, string hyperlink) { if (!string.IsNullOrEmpty(hyperlink)) { int num; char[] separator = new char[] { '|' }; string[] strArray = hyperlink.Split(separator); if (strArray.Length != 2) { return(false); } if (!int.TryParse(strArray[0], out num)) { return(false); } char[] chArray2 = new char[] { ',' }; string[] strArray2 = strArray[1].Split(chArray2); CUIEventScript component = target.GetComponent <CUIEventScript>(); stUIEventParams eventParams = new stUIEventParams(); switch (((COM_HYPERLINK_TYPE)num)) { case COM_HYPERLINK_TYPE.COM_HYPERLINK_TYPE_GUILD_INVITE: if (strArray2.Length == 4) { ulong num3 = ulong.Parse(strArray2[0]); int num4 = int.Parse(strArray2[1]); ulong num5 = ulong.Parse(strArray2[2]); int num6 = int.Parse(strArray2[3]); eventParams.commonUInt64Param1 = num3; eventParams.tag = num4; eventParams.commonUInt64Param2 = num5; eventParams.tag2 = num6; component.SetUIEvent(enUIEventType.Click, enUIEventID.Guild_Hyperlink_Search_Guild, eventParams); Utility.GetComponetInChild <Text>(target, "Text").text = Singleton <CTextManager> .instance.GetText("Common_Check"); return(true); } return(false); case COM_HYPERLINK_TYPE.COM_HYPERLINK_TYPE_PREGUILD_INVITE: if (strArray2.Length == 1) { ulong num8 = ulong.Parse(strArray2[0]); eventParams.commonUInt64Param1 = num8; component.SetUIEvent(enUIEventType.Click, enUIEventID.Guild_Hyperlink_Search_PrepareGuild, eventParams); Utility.GetComponetInChild <Text>(target, "Text").text = Singleton <CTextManager> .instance.GetText("Common_Check"); return(true); } return(false); case COM_HYPERLINK_TYPE.COM_HYPERLINK_TYPE_FORM_JUMP: { int result = 0; if (!int.TryParse(strArray2[0], out result)) { return(false); } eventParams.tag = result; component.SetUIEvent(enUIEventType.Click, enUIEventID.Mail_JumpForm, eventParams); if (strArray2.Length != 2) { Utility.GetComponetInChild <Text>(target, "Text").text = Singleton <CTextManager> .instance.GetText("Common_Check"); } else { Utility.GetComponetInChild <Text>(target, "Text").text = strArray2[1]; } return(true); } case COM_HYPERLINK_TYPE.COM_HYPERLINK_TYPE_URL: eventParams.tagStr = strArray2[0]; component.SetUIEvent(enUIEventType.Click, enUIEventID.Mail_JumpUrl, eventParams); if (strArray2.Length != 2) { Utility.GetComponetInChild <Text>(target, "Text").text = Singleton <CTextManager> .instance.GetText("Common_Check"); } else { Utility.GetComponetInChild <Text>(target, "Text").text = strArray2[1]; } return(true); } } return(false); }
public void UpdateView(CUIEvent uiEvent) { CUIFormScript srcFormScript = uiEvent.m_srcFormScript; GameObject srcWidget = uiEvent.m_srcWidget; if ((srcFormScript != null) && (srcWidget != null)) { CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); DebugHelper.Assert(masterRoleInfo != null, "master roleInfo is null"); if (masterRoleInfo != null) { GameObject p = Utility.FindChild(srcWidget, "heroItem"); if (p == null) { DebugHelper.Assert(p != null, "hero item is null"); } else { Text componetInChild = Utility.GetComponetInChild <Text>(p, "heroDataPanel/heroNamePanel/heroNameText"); GameObject obj4 = Utility.FindChild(p, "heroDataPanel/heroNamePanel/heroSkinText"); if (obj4 != null) { Text component = obj4.GetComponent <Text>(); GameObject obj5 = Utility.FindChild(p, "tag"); if (obj5 != null) { GameObject obj6 = Utility.FindChild(p, "profession"); if (obj6 != null) { GameObject obj7 = Utility.FindChild(srcWidget, "imgExperienceMark"); if (obj7 != null) { GameObject obj8 = Utility.FindChild(p, "skinLabelImage"); if (obj8 != null) { GameObject obj9 = Utility.FindChild(p, "heroDataPanel/heroPricePanel"); if (obj9 != null) { obj9.CustomSetActive(false); GameObject obj10 = Utility.FindChild(srcWidget, "ButtonGroup/BuyBtn"); if (obj10 != null) { obj10.CustomSetActive(false); Text text3 = Utility.GetComponetInChild <Text>(obj10, "Text"); Button button = obj10.GetComponent <Button>(); if (button != null) { CUIEventScript script2 = obj10.GetComponent <CUIEventScript>(); if (script2 != null) { script2.enabled = false; button.enabled = false; GameObject obj11 = Utility.FindChild(srcWidget, "ButtonGroup/LinkBtn"); if (obj11 != null) { obj11.CustomSetActive(false); Text text4 = Utility.GetComponetInChild <Text>(obj11, "Text"); Button button2 = obj11.GetComponent <Button>(); if (button2 != null) { CUIEventScript script3 = obj11.GetComponent <CUIEventScript>(); if (script3 != null) { script3.enabled = false; button2.enabled = false; switch (this.m_ItemType) { case COM_ITEM_TYPE.COM_OBJTYPE_HERO: { ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(this.m_itemID); DebugHelper.Assert(dataByKey != null, "神秘商店配置的英雄ID有错,英雄表里不存在"); if (dataByKey != null) { CUICommonSystem.SetHeroItemImage(uiEvent.m_srcFormScript, p, StringHelper.UTF8BytesToString(ref dataByKey.szImagePath), enHeroHeadType.enBust, false); obj6.CustomSetActive(true); CUICommonSystem.SetHeroJob(srcFormScript, obj6, (enHeroJobType)dataByKey.bJob); obj8.CustomSetActive(false); obj4.CustomSetActive(false); if (componetInChild != null) { componetInChild.text = StringHelper.UTF8BytesToString(ref dataByKey.szName); } if (masterRoleInfo.IsHaveHero(dataByKey.dwCfgID, false)) { obj10.CustomSetActive(true); text3.text = Singleton <CTextManager> .GetInstance().GetText("Mall_Hero_State_Own"); obj5.CustomSetActive(false); obj7.CustomSetActive(false); } else { obj7.CustomSetActive(masterRoleInfo.IsValidExperienceHero(dataByKey.dwCfgID)); stPayInfoSet lowestPayInfoSetOfGood = CMallSystem.GetLowestPayInfoSetOfGood(dataByKey, CMallSystem.ResBuyTypeToPayType(this.Cfg.bMoneyType)); if (lowestPayInfoSetOfGood.m_payInfoCount == 0) { obj11.CustomSetActive(true); text4.text = StringHelper.UTF8BytesToString(ref dataByKey.szObtWay); if (dataByKey.bObtWayType > 0) { script3.enabled = true; button2.enabled = true; stUIEventParams eventParams = new stUIEventParams { tag = dataByKey.bObtWayType }; script3.SetUIEvent(enUIEventType.Click, enUIEventID.Mall_Jump_Form, eventParams); } else { script3.enabled = false; button2.enabled = false; } } else { obj9.CustomSetActive(true); obj10.CustomSetActive(true); text3.text = Singleton <CTextManager> .GetInstance().GetText("Mall_Buy"); script2.enabled = true; button.enabled = true; this.UpdateItemPricePnl(srcFormScript, obj9.transform, obj5.transform, ref lowestPayInfoSetOfGood); stUIEventParams params2 = new stUIEventParams { tag = uiEvent.m_srcWidgetIndexInBelongedList }; script2.SetUIEvent(enUIEventType.Click, enUIEventID.Mall_Mystery_On_Open_Buy_Form, params2); } } break; } return; } case COM_ITEM_TYPE.COM_OBJTYPE_HEROSKIN: { ResHeroSkin heroSkin = CSkinInfo.GetHeroSkin(this.m_itemID); DebugHelper.Assert(heroSkin != null, "神秘商店配置的皮肤ID有错,皮肤表里不存在"); if (heroSkin != null) { ResHeroCfgInfo info3 = GameDataMgr.heroDatabin.GetDataByKey(heroSkin.dwHeroID); DebugHelper.Assert(info3 != null, "神秘商店配置的皮肤ID有错,皮肤对应的英雄不存在"); if (info3 == null) { return; } CUICommonSystem.SetHeroItemImage(uiEvent.m_srcFormScript, p.gameObject, heroSkin.szSkinPicID, enHeroHeadType.enBust, false); obj6.CustomSetActive(false); CUICommonSystem.SetHeroSkinLabelPic(uiEvent.m_srcFormScript, obj8, heroSkin.dwHeroID, heroSkin.dwSkinID); obj4.CustomSetActive(true); if (componetInChild != null) { componetInChild.text = StringHelper.UTF8BytesToString(ref info3.szName); } if (component != null) { component.text = StringHelper.UTF8BytesToString(ref heroSkin.szSkinName); } if (masterRoleInfo.IsHaveHeroSkin(heroSkin.dwHeroID, heroSkin.dwSkinID, false)) { obj10.CustomSetActive(true); text3.text = Singleton <CTextManager> .GetInstance().GetText("Mall_Skin_State_Own"); obj5.CustomSetActive(false); obj7.CustomSetActive(false); } else { obj7.CustomSetActive(masterRoleInfo.IsValidExperienceSkin(heroSkin.dwHeroID, heroSkin.dwSkinID)); obj9.CustomSetActive(true); stPayInfoSet payInfoSet = CMallSystem.GetLowestPayInfoSetOfGood(heroSkin, CMallSystem.ResBuyTypeToPayType(this.Cfg.bMoneyType)); if (payInfoSet.m_payInfoCount == 0) { obj11.CustomSetActive(true); text4.text = StringHelper.UTF8BytesToString(ref heroSkin.szGetPath); } else { obj11.CustomSetActive(false); this.UpdateItemPricePnl(srcFormScript, obj9.transform, obj5.transform, ref payInfoSet); } if (masterRoleInfo.IsCanBuySkinButNotHaveHero(heroSkin.dwHeroID, heroSkin.dwSkinID)) { obj10.CustomSetActive(true); script2.enabled = true; text3.text = Singleton <CTextManager> .GetInstance().GetText("Mall_Skin_State_Buy_hero"); button.enabled = true; stUIEventParams params3 = new stUIEventParams(); params3.openHeroFormPar.heroId = heroSkin.dwHeroID; params3.openHeroFormPar.skinId = heroSkin.dwSkinID; params3.openHeroFormPar.openSrc = enHeroFormOpenSrc.SkinBuyClick; script2.SetUIEvent(enUIEventType.Click, enUIEventID.HeroInfo_OpenForm, params3); if (payInfoSet.m_payInfoCount > 0) { this.UpdateItemPricePnl(srcFormScript, obj9.transform, obj5.transform, ref payInfoSet); } } else { obj11.CustomSetActive(false); obj10.CustomSetActive(true); text3.text = Singleton <CTextManager> .GetInstance().GetText("Mall_Buy"); script2.enabled = true; button.enabled = true; stUIEventParams params4 = new stUIEventParams { tag = uiEvent.m_srcWidgetIndexInBelongedList }; script2.SetUIEvent(enUIEventType.Click, enUIEventID.Mall_Mystery_On_Open_Buy_Form, params4); } } break; } return; } } } } } } } } } } } } } } } } } }
private void SetItem(CUseable usable, GameObject uiNode, bool received, bool ready, uint vipLv) { SevenDayCheckHelper component = uiNode.GetComponent <SevenDayCheckHelper>(); Image component2 = component.Icon.GetComponent <Image>(); CUIUtility.SetImageSprite(component2, usable.GetIconPath(), this._form, true, false, false, false); component.ItemName.GetComponent <Text>().text = usable.m_name; if (vipLv > 0u) { component.NobeRoot.CustomSetActive(true); MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component.Nobe.GetComponent <Image>(), (int)vipLv, false); } else { component.NobeRoot.CustomSetActive(false); } if (usable.m_type == 4 || usable.m_type == 7 || (usable.m_type == 2 && CItem.IsHeroExperienceCard(usable.m_baseID)) || (usable.m_type == 2 && CItem.IsSkinExChangeCoupons(usable.m_baseID))) { component.IconBg.CustomSetActive(true); } else { component.IconBg.CustomSetActive(false); } Transform transform = component.Tiyan.transform; if (transform != null) { if (usable.m_type == 2 && CItem.IsHeroExperienceCard(usable.m_baseID)) { transform.gameObject.CustomSetActive(true); transform.GetComponent <Image>().SetSprite(CUIUtility.GetSpritePrefeb(CExperienceCardSystem.HeroExperienceCardMarkPath, false, false), false); } else if (usable.m_type == 2 && CItem.IsSkinExperienceCard(usable.m_baseID)) { transform.gameObject.CustomSetActive(true); transform.GetComponent <Image>().SetSprite(CUIUtility.GetSpritePrefeb(CExperienceCardSystem.SkinExperienceCardMarkPath, false, false), false); } else { transform.gameObject.CustomSetActive(false); } } Transform transform2 = component.ItemNumText.transform; if (transform2 != null) { Text component3 = transform2.GetComponent <Text>(); if (usable.m_stackCount < 10000) { component3.text = usable.m_stackCount.ToString(); } else { component3.text = usable.m_stackCount / 10000 + "万"; } CUICommonSystem.AppendMultipleText(component3, usable.m_stackMulti); if (usable.m_stackCount <= 1) { component3.gameObject.CustomSetActive(false); component.ItemNum.CustomSetActive(false); } else { component.ItemNum.CustomSetActive(true); component.ItemNumText.CustomSetActive(true); } if (usable.m_type == 5) { if (((CSymbolItem)usable).IsGuildSymbol()) { component3.text = string.Empty; } else { component3.text = usable.GetSalableCount().ToString(); } } } if (received) { component.GrayMask.CustomSetActive(true); } else { component.GrayMask.CustomSetActive(false); } if (ready) { component.Effect.CustomSetActive(true); } else { component.Effect.CustomSetActive(false); } CUIEventScript component4 = uiNode.GetComponent <CUIEventScript>(); stUIEventParams eventParams = new stUIEventParams { iconUseable = usable }; component4.SetUIEvent(enUIEventType.Down, enUIEventID.Tips_ItemInfoOpen, eventParams); component4.SetUIEvent(enUIEventType.HoldEnd, enUIEventID.Tips_ItemInfoClose, eventParams); component4.SetUIEvent(enUIEventType.Click, enUIEventID.Tips_ItemInfoClose, eventParams); component4.SetUIEvent(enUIEventType.DragEnd, enUIEventID.Tips_ItemInfoClose, eventParams); }
private void RefreshOverviewForm(CUIFormScript overviewForm = null) { if (overviewForm == null) { overviewForm = Singleton <CUIManager> .GetInstance().GetForm("UGUI/Form/System/Achieve/Form_Trophy_Overview.prefab"); } if (overviewForm == null) { return; } CUIListScript component = overviewForm.GetWidget(1).GetComponent <CUIListScript>(); if (component != null) { component.SetElementAmount(this.m_CurAchieveSeries.Count); } GameObject widget = overviewForm.GetWidget(2); GameObject widget2 = overviewForm.GetWidget(3); GameObject widget3 = overviewForm.GetWidget(7); GameObject widget4 = overviewForm.GetWidget(8); GameObject widget5 = overviewForm.GetWidget(9); GameObject widget6 = overviewForm.GetWidget(10); GameObject widget7 = overviewForm.GetWidget(4); GameObject widget8 = overviewForm.GetWidget(5); GameObject widget9 = overviewForm.GetWidget(6); if (widget == null || widget2 == null || widget3 == null || widget4 == null || widget7 == null || widget8 == null || widget9 == null || widget5 == null || widget6 == null) { DebugHelper.Assert(false, "Some of Trophy overview form widgets is null"); return; } Text component2 = widget.GetComponent <Text>(); Text component3 = widget2.GetComponent <Text>(); Image component4 = widget6.GetComponent <Image>(); Image component5 = widget3.GetComponent <Image>(); Text component6 = widget4.GetComponent <Text>(); CAchieveInfo2 masterAchieveInfo = CAchieveInfo2.GetMasterAchieveInfo(); if (masterAchieveInfo.LastDoneTrophyRewardInfo != null) { component4.SetSprite(masterAchieveInfo.LastDoneTrophyRewardInfo.GetTrophyImagePath(), overviewForm, true, false, false, false); } component2.set_text((masterAchieveInfo.LastDoneTrophyRewardInfo == null) ? "0" : string.Format("{0}", masterAchieveInfo.LastDoneTrophyRewardInfo.Cfg.dwTrophyLvl)); if (masterAchieveInfo.GetWorldRank() == 0u) { widget5.CustomSetActive(true); widget2.CustomSetActive(false); } else { widget5.CustomSetActive(false); widget2.CustomSetActive(true); component3.set_text(masterAchieveInfo.GetWorldRank().ToString()); } uint num = 0u; uint num2 = 0u; masterAchieveInfo.GetTrophyProgress(ref num, ref num2); CTrophyRewardInfo trophyRewardInfoByPoint = masterAchieveInfo.GetTrophyRewardInfoByPoint(num); CTrophyRewardInfo trophyRewardInfoByIndex = masterAchieveInfo.GetTrophyRewardInfoByIndex(trophyRewardInfoByPoint.Index + 1); component5.set_fillAmount(Utility.Divide(num - trophyRewardInfoByIndex.MinPoint, trophyRewardInfoByIndex.MaxPoint - trophyRewardInfoByIndex.MinPoint)); component6.set_text(string.Format("{0}/{1}", num - trophyRewardInfoByIndex.MinPoint, trophyRewardInfoByIndex.MaxPoint - trophyRewardInfoByIndex.MinPoint)); Text component7 = widget7.GetComponent <Text>(); CUIListScript component8 = widget8.GetComponent <CUIListScript>(); CUIEventScript component9 = widget9.GetComponent <CUIEventScript>(); CTrophyRewardInfo firstTrophyRewardInfoAwardNotGot = masterAchieveInfo.GetFirstTrophyRewardInfoAwardNotGot(); if (firstTrophyRewardInfoAwardNotGot == null) { widget7.CustomSetActive(false); widget9.CustomSetActive(false); component8.SetElementAmount(0); } else { bool flag = false; CUseable[] trophyRewards = firstTrophyRewardInfoAwardNotGot.GetTrophyRewards(); if (!firstTrophyRewardInfoAwardNotGot.HasGotAward() && firstTrophyRewardInfoAwardNotGot.IsFinish()) { flag = true; } widget7.CustomSetActive(true); component7.set_text(string.Format("{0}级奖励:", firstTrophyRewardInfoAwardNotGot.Cfg.dwTrophyLvl)); component8.SetElementAmount(trophyRewards.Length); for (int i = 0; i < trophyRewards.Length; i++) { CUIListElementScript elemenet = component8.GetElemenet(i); CUICommonSystem.SetItemCell(overviewForm, elemenet.GetWidget(0), trophyRewards[i], false, false, false, false); } widget9.CustomSetActive(true); if (flag) { CUICommonSystem.SetButtonEnableWithShader(widget9.GetComponent <Button>(), true, true); component9.SetUIEvent(enUIEventType.Click, enUIEventID.Achievement_Get_Trophy_Reward, new stUIEventParams { tag = firstTrophyRewardInfoAwardNotGot.Index }); } else { CUICommonSystem.SetButtonEnableWithShader(widget9.GetComponent <Button>(), false, true); } } }