private void On_Guild_PrepareGuild_Create_Icon_Selected(CUIEvent uiEvent) { CUIListScript srcWidgetScript = uiEvent.m_srcWidgetScript as CUIListScript; if (srcWidgetScript != null) { int selectedIndex = srcWidgetScript.GetSelectedIndex(); if (selectedIndex == -1) { selectedIndex = 0; } CUIListElementScript elemenet = srcWidgetScript.GetElemenet(selectedIndex); if (elemenet != null) { Text component = elemenet.transform.Find("imgIcon/txtIconIdData").GetComponent <Text>(); this.m_form.GetWidget(8).GetComponent <Text>().text = component.text; this.m_form.GetWidget(4).GetComponent <Image>().SetSprite(elemenet.transform.Find("imgIcon").GetComponent <Image>()); CUIFormScript srcFormScript = uiEvent.m_srcFormScript; if (srcFormScript != null) { srcFormScript.Close(); } } } }
private void OnSymbolRcmdLevelChange(CUIEvent uiEvent) { CUIListScript component = uiEvent.m_srcWidget.GetComponent <CUIListScript>(); this.m_symbolRcmdLevel = (ushort)(component.GetSelectedIndex() + 1); this.RefreshRcmdSymbolListPanel(); }
private void OnInvite_TabChange(CUIEvent uiEvent) { CUIFormScript srcFormScript = uiEvent.m_srcFormScript; CUIListScript component = uiEvent.m_srcWidget.GetComponent <CUIListScript>(); GameObject widget = srcFormScript.GetWidget(0); GameObject obj3 = srcFormScript.GetWidget(1); if (component.GetSelectedIndex() == 0) { widget.CustomSetActive(true); obj3.CustomSetActive(false); } else { obj3.CustomSetActive(true); widget.CustomSetActive(false); if (this.m_isFirstlySelectGuildMemberTab) { this.InitAllGuildMemberList(); this.SendGetGuildMemberGameStateReq(); CUITimerScript script3 = srcFormScript.GetWidget(8).GetComponent <CUITimerScript>(); script3.SetTotalTime(1000f); script3.SetOnChangedIntervalTime(10f); script3.StartTimer(); this.m_isFirstlySelectGuildMemberTab = false; } } }
private void OnBttleMatchInfoTabChange(CUIEvent uiEvent) { CUIListScript component = uiEvent.m_srcWidget.GetComponent <CUIListScript>(); if (component != null) { int selectedIndex = component.GetSelectedIndex(); if ((Singleton <CUIManager> .GetInstance().GetForm(s_battleStateViewUIForm) != null) && (((this.heroView != null) || (this.matchInfo != null)) || (this.valueInfo != null))) { this.SortHeroAndPlayer(); if (selectedIndex == 0) { this.heroView.CustomSetActive(true); this.matchInfo.CustomSetActive(true); this.valueInfo.CustomSetActive(false); this.UpdateKDAView(); } else { this.heroView.CustomSetActive(true); this.matchInfo.CustomSetActive(false); this.valueInfo.CustomSetActive(true); this.m_battleHeroPropertyChange = true; this.UpdateBattleState(null); } } } }
private void On_Guild_PrepareGuild_Create_Icon_Selected(CUIEvent uiEvent) { CUIListScript cUIListScript = uiEvent.m_srcWidgetScript as CUIListScript; if (cUIListScript == null) { return; } int num = cUIListScript.GetSelectedIndex(); if (num == -1) { num = 0; } CUIListElementScript elemenet = cUIListScript.GetElemenet(num); if (elemenet == null) { return; } Text component = elemenet.transform.Find("imgIcon/txtIconIdData").GetComponent <Text>(); Text component2 = this.m_form.GetWidget(8).GetComponent <Text>(); component2.text = component.text; Image component3 = this.m_form.GetWidget(4).GetComponent <Image>(); component3.SetSprite(elemenet.transform.Find("imgIcon").GetComponent <Image>()); CUIFormScript srcFormScript = uiEvent.m_srcFormScript; if (srcFormScript != null) { srcFormScript.Close(); } }
private void OnMenuChange(CUIEvent uiEvent) { CUIListScript cUIListScript = uiEvent.m_srcWidgetScript as CUIListScript; if (cUIListScript == null) { return; } int selectedIndex = cUIListScript.GetSelectedIndex(); if (selectedIndex < 0 || selectedIndex > 2) { DebugHelper.Assert(false, "Achievement type form selected menu indx out of range!"); return; } this.CurMenu = (CAchievementSystem.enTypeMenu)selectedIndex; CAchieveInfo2 masterAchieveInfo = CAchieveInfo2.GetMasterAchieveInfo(); this.m_CurAchieveSeries = new ListView <CAchieveItem2>(); CAchievementSystem.enTypeMenu curMenu = this.CurMenu; if (curMenu != CAchievementSystem.enTypeMenu.All) { if (curMenu == CAchievementSystem.enTypeMenu.Not_Finish) { this.m_CurAchieveSeries = masterAchieveInfo.GetTrophies(enTrophyState.UnFinish); this.m_CurAchieveSeries.Sort(new CAchieveSort()); } } else { this.m_CurAchieveSeries = masterAchieveInfo.GetTrophies(enTrophyState.All); this.m_CurAchieveSeries.Sort(new CAchieveSort()); } this.RefreshOverviewForm(uiEvent.m_srcFormScript); }
public void OnCommonHeroSubListClick(CUIEvent uiEvent) { CUIFormScript form = Singleton <CUIManager> .get_instance().GetForm(CPlayerCommonHeroInfoController.sPlayerInfoCommonHeroFormPath); if (form == null) { return; } GameObject widget = form.GetWidget(0); CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(widget, "SubMenuList/List"); int selectedIndex = componetInChild.GetSelectedIndex(); byte gameType = CPlayerCommonHeroInfoController.GetGameType(selectedIndex); this.m_commonHeroList.Clear(); ListView <COMDT_MOST_USED_HERO_INFO> listView = Singleton <CPlayerInfoSystem> .get_instance().GetProfile().MostUsedHeroList(); for (int i = 0; i < listView.get_Count(); i++) { int num = 0; while ((long)num < (long)((ulong)listView.get_Item(i).stStatisticDetail.dwNum)) { if ((gameType == 0 || listView.get_Item(i).stStatisticDetail.astTypeDetail[num].bGameType == gameType) && listView.get_Item(i).stStatisticDetail.astTypeDetail[num].dwWinNum + listView.get_Item(i).stStatisticDetail.astTypeDetail[num].dwLoseNum > 0u) { this.m_commonHeroList.Add(listView.get_Item(i)); break; } num++; } } this.UpdateUI(); }
private void OnSymbolLevelMenuSelect(CUIEvent uiEvent) { CUIListScript component = uiEvent.m_srcWidget.GetComponent <CUIListScript>(); this.m_symbolFilterLevel = component.GetSelectedIndex() + 1; this.SetSymbolMakeListData(); this.RefreshSymbolMakeList(uiEvent.m_srcFormScript); }
private void OnHeroJobSelect(CUIEvent uiEvent) { CUIListScript component = uiEvent.m_srcWidget.GetComponent <CUIListScript>(); int selectedIndex = component.GetSelectedIndex(); this.m_heroJobType = (enHeroJobType)selectedIndex; this.RefreshHeroListObject(uiEvent.m_srcFormScript); }
private void OnVideoEnterConfirm(CUIEvent cuiEvent) { CUIFormScript form = Singleton <CUIManager> .get_instance().GetForm(COBSystem.OB_FORM_PATH); if (form == null) { return; } CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(form.gameObject, "ContentList"); if (componetInChild == null) { return; } int selectedIndex = componetInChild.GetSelectedIndex(); COBSystem.enOBTab curTab = this.CurTab; if (curTab == COBSystem.enOBTab.Expert) { if (selectedIndex >= 0 && selectedIndex < this.OBExpertList.get_Count()) { Singleton <WatchController> .GetInstance().TargetUID = this.OBExpertList.get_Item(selectedIndex).heroLabel.ullUid; COBSystem.SendOBServeGreat(this.OBExpertList.get_Item(selectedIndex).desk); } int count = this.OBExpertList.get_Count(); } else if (curTab == COBSystem.enOBTab.Friend) { if (selectedIndex >= 0 && selectedIndex < this.OBFriendList.get_Count()) { Singleton <WatchController> .GetInstance().TargetUID = this.OBFriendList.get_Item(selectedIndex).uin.ullUid; COBSystem.SendOBServeFriend(this.OBFriendList.get_Item(selectedIndex).uin); } int count = this.OBFriendList.get_Count(); } else if (curTab == COBSystem.enOBTab.Guild) { if (selectedIndex >= 0 && selectedIndex < this.OBGuildList.get_Count()) { Singleton <WatchController> .GetInstance().TargetUID = this.OBGuildList.get_Item(selectedIndex).playerUid; Singleton <CGuildMatchSystem> .GetInstance().RequestObGuildMatch(this.OBGuildList.get_Item(selectedIndex).obUid); } int count = this.OBGuildList.get_Count(); } else if (curTab == COBSystem.enOBTab.Local) { Singleton <WatchController> .GetInstance().TargetUID = Singleton <CRoleInfoManager> .get_instance().masterUUID; if (selectedIndex >= 0 && selectedIndex < this.OBLocalList.get_Count()) { Singleton <WatchController> .GetInstance().StartReplay(this.OBLocalList.get_Item(selectedIndex).path); } int count = this.OBLocalList.get_Count(); } }
private void OnHeroTypeListSelect(CUIEvent uiEvent) { CUIListScript srcWidgetScript = (CUIListScript)uiEvent.m_srcWidgetScript; if (srcWidgetScript != null) { this.m_curHeroJob = (enHeroJobType)srcWidgetScript.GetSelectedIndex(); this.RefreshHeroListPanel(); } }
public void OnHeroView_MenuSelect(CUIEvent uiEvent) { CUIListScript component = uiEvent.m_srcWidget.GetComponent <CUIListScript>(); int selectedIndex = component.GetSelectedIndex(); if (selectedIndex != (int)this.m_selectHeroType) { this.m_selectHeroType = (enHeroJobType)selectedIndex; this.ResetHeroListData(true); } }
private HeadIconSys.enHeadImgTab GetCurTab() { CUIFormScript form = Singleton <CUIManager> .instance.GetForm(HeadIconSys.s_headImgChgForm); if (form != null) { CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(form.gameObject, "pnlBg/Panel_Menu/List"); return((HeadIconSys.enHeadImgTab)componetInChild.GetSelectedIndex()); } return(HeadIconSys.enHeadImgTab.All); }
private void On_Chat_Tab_Change(CUIEvent uievent) { if ((this.view != null) && this.view.bShow) { CUIListScript component = uievent.m_srcWidget.GetComponent <CUIListScript>(); int selectedIndex = component.GetSelectedIndex(); selectedIndex = component.GetElemenet(selectedIndex).GetComponent <CUIEventScript>().m_onClickEventParams.tag; this.view.On_Tab_Change(selectedIndex); this.view.ReBuildTabText(); } }
private void On_Tab_Change(CUIEvent uiEvent) { CUIListScript component = uiEvent.m_srcWidget.GetComponent <CUIListScript>(); if (component != null) { int selectedIndex = component.GetSelectedIndex(); this.CurTab = (Tab)selectedIndex; this.InitPanel(); } }
public int GetFriendMailListSelectedIndex() { if (this.m_panelFri != null) { CUIListScript component = this.m_panelFri.transform.Find("List").GetComponent <CUIListScript>(); if (component != null) { return(component.GetSelectedIndex()); } } return(-1); }
private void OnAchievementGetAward(CUIEvent uiEvent) { CUIListScript srcWidgetScript = uiEvent.m_srcWidgetScript as CUIListScript; if (srcWidgetScript == null) { DebugHelper.Assert(false, "CAchievementSystem.OnAchievementGetAward(): listScript is null"); } else if ((srcWidgetScript.GetSelectedIndex() >= this.m_oneTypeAchieveItems.Count) || (srcWidgetScript.GetSelectedIndex() < 0)) { object[] inParameters = new object[] { srcWidgetScript.GetSelectedIndex() }; DebugHelper.Assert(false, "CAchievementSystem.OnAchievementGetAward(): list index out of range: {0}", inParameters); } else { CAchieveItem item = this.m_oneTypeAchieveItems[srcWidgetScript.GetSelectedIndex()]; if (item.IsCanGetReward()) { SendGetAchieveRewardReq(item.m_cfgId); } } }
public void OnLocation1Choose(CUIEvent evt) { if (evt == null || evt.m_srcWidget == null) { return; } CUIListScript component = evt.m_srcWidget.GetComponent <CUIListScript>(); if (component == null) { return; } Transform transform = this.m_searchTypeNodes[6].transform; if (transform == null) { return; } GameObject gameObject = transform.Find("Button_Down").gameObject; CUIListScript component2 = transform.Find("List").GetComponent <CUIListScript>(); int selectedIndex = component.GetSelectedIndex(); if (selectedIndex < this.m_addressBook.get_Count()) { Dictionary <string, object> dictionary = this.m_addressBook.get_Item(selectedIndex) as Dictionary <string, object>; object obj = null; if (dictionary.TryGetValue("sub", ref obj)) { List <object> list = obj as List <object>; if (list != null) { int num = 0; this.m_searchStrings[6] = new string[list.get_Count()]; using (List <object> .Enumerator enumerator = list.GetEnumerator()) { while (enumerator.MoveNext()) { Dictionary <string, object> dictionary2 = (Dictionary <string, object>)enumerator.get_Current(); object obj2 = null; if (dictionary2.TryGetValue("name", ref obj2)) { this.m_searchStrings[6][num] = (obj2 as string); num++; } } } CUIUtility.RegisterTextComboboxContent(gameObject, component2, this.m_searchStrings[6], null); } } } }
private void OnVideoEnterConfirm(CUIEvent cuiEvent) { CUIFormScript form = Singleton <CUIManager> .instance.GetForm(OB_FORM_PATH); if (form != null) { CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(form.gameObject, "ContentList"); if (componetInChild != null) { int selectedIndex = componetInChild.GetSelectedIndex(); int count = 0; switch (this.CurTab) { case enOBTab.Expert: if ((selectedIndex >= 0) && (selectedIndex < this.OBExpertList.Count)) { stOBExpert expert = this.OBExpertList[selectedIndex]; Singleton <WatchController> .GetInstance().TargetUID = expert.heroLabel.ullUid; stOBExpert expert2 = this.OBExpertList[selectedIndex]; SendOBServeGreat(expert2.desk); } count = this.OBExpertList.Count; break; case enOBTab.Friend: if ((selectedIndex >= 0) && (selectedIndex < this.OBFriendList.Count)) { stOBFriend friend = this.OBFriendList[selectedIndex]; Singleton <WatchController> .GetInstance().TargetUID = friend.uin.ullUid; stOBFriend friend2 = this.OBFriendList[selectedIndex]; SendOBServeFriend(friend2.uin); } count = this.OBFriendList.Count; break; case enOBTab.Local: Singleton <WatchController> .GetInstance().TargetUID = Singleton <CRoleInfoManager> .instance.masterUUID; if ((selectedIndex >= 0) && (selectedIndex < this.OBLocalList.Count)) { Singleton <WatchController> .GetInstance().StartReplay(this.OBLocalList[selectedIndex].path); } count = this.OBLocalList.Count; break; } } } }
private int GetDropListSelectIdx(int searchType) { CUIListScript component = this.m_searchTypeNodes[searchType].transform.FindChild("List").GetComponent <CUIListScript>(); if (component != null) { int num = component.GetSelectedIndex(); if (num < 0) { num = 0; component.SelectElement(0, true); } return(num); } return(0); }
public void OnCommonHeroSortListClick(CUIEvent uiEvent) { CUIFormScript form = Singleton <CUIManager> .get_instance().GetForm(CPlayerCommonHeroInfoController.sPlayerInfoCommonHeroFormPath); if (form == null) { return; } GameObject widget = form.GetWidget(0); CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(widget, "SubMenuList/List"); CUIListScript componetInChild2 = Utility.GetComponetInChild <CUIListScript>(widget, "DetailList/MenuList"); int selectedIndex = componetInChild2.GetSelectedIndex(); this.UpdateSortMenu(); this.SrotCommonHeroList(selectedIndex); this.UpdateUI(); }
private ResHeadImage GetSelectedHeadImg() { CUIFormScript form = Singleton <CUIManager> .instance.GetForm(HeadIconSys.s_headImgChgForm); if (form != null) { CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(form.gameObject, "pnlBg/Panel_Menu/List"); CUIListScript componetInChild2 = Utility.GetComponetInChild <CUIListScript>(form.gameObject, "pnlBg/Panel_Main/List"); int selectedIndex = componetInChild.GetSelectedIndex(); int selectedIndex2 = componetInChild2.GetSelectedIndex(); ListView <ResHeadImage> curHeadImgList = this.GetCurHeadImgList((HeadIconSys.enHeadImgTab)selectedIndex); if (selectedIndex2 > -1 && selectedIndex2 < curHeadImgList.Count) { return(curHeadImgList[selectedIndex2]); } } return(null); }
private void OnSharePVPDefeatAddBarrage(CUIEvent uiEvent) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(PvpAchievementForm.s_formSharePVPDefeatPath); if (form == null) { return; } GameObject widget = form.GetWidget(1); if (widget != null && !widget.activeSelf) { widget.CustomSetActive(true); } GameObject gameObject = Utility.FindChild(widget, "BarrageList"); if (gameObject == null) { return; } CUIListScript component = gameObject.GetComponent <CUIListScript>(); if (component == null) { return; } component.SetElementAmount(this.barrageList.Count); component.MoveElementInScrollArea(0, true); for (int i = 0; i < this.barrageList.Count; i++) { if (component.GetElemenet(i) != null && component.IsElementInScrollArea(i)) { this.UpdateOneBarrageElement(component.GetElemenet(i).gameObject, i, false); } } if (component.GetSelectedIndex() == -1) { component.SelectElement(0, true); } if (!gameObject.activeSelf) { gameObject.CustomSetActive(true); } }
private void OnMenuSelect(CUIEvent uiEvent) { CUIFormScript srcFormScript = uiEvent.m_srcFormScript; if (srcFormScript == null) { return; } CUIListScript component = uiEvent.m_srcWidget.GetComponent <CUIListScript>(); if (null == component) { return; } int selectedIndex = component.GetSelectedIndex(); this.m_selectMenuType = (enSymbolMenuType)selectedIndex; this.LoadSubModule(srcFormScript, uiEvent); }
private void OnBag_MenuSelect(CUIEvent uiEvent) { GameObject gameObject = uiEvent.m_srcFormScript.gameObject; GameObject obj3 = gameObject.transform.Find("Panel_Left").gameObject; int selectedIndex = uiEvent.m_srcWidget.GetComponent <CUIListScript>().GetSelectedIndex(); int lastSelectedIndex = uiEvent.m_srcWidget.GetComponent <CUIListScript>().GetLastSelectedIndex(); this.m_selectUseableType = (enItemMenuType)selectedIndex; CUseableContainer useableContainer = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().GetUseableContainer(enCONTAINER_TYPE.ITEM); if (useableContainer != null) { CUseableContainer containerBySelectType = this.GetContainerBySelectType(useableContainer); if (containerBySelectType != null) { containerBySelectType.SortItemBag(); } this.m_selectUseableContainer = containerBySelectType; CUIListScript component = gameObject.transform.Find("Panel_Right/List").gameObject.GetComponent <CUIListScript>(); component.SetElementAmount(this.m_selectUseableContainer.GetCurUseableCount()); if (component.m_elementAmount == 0) { obj3.CustomSetActive(false); } else { int index = component.GetSelectedIndex(); if (((index < 0) || (index >= component.m_elementAmount)) || (selectedIndex != lastSelectedIndex)) { component.SelectElement(0, true); this.RefreshSelectItem(uiEvent.m_srcFormScript, uiEvent.m_srcFormScript.gameObject, 0); component.MoveElementInScrollArea(0, true); } else { component.SelectElement(index, true); this.RefreshSelectItem(uiEvent.m_srcFormScript, uiEvent.m_srcFormScript.gameObject, index); component.MoveElementInScrollArea(index, true); } } } }
private void OnHonorChosen(CUIEvent uiEvent) { GameObject widget = uiEvent.m_srcFormScript.GetWidget(9); if (widget == null) { return; } GameObject gameObject = Utility.FindChild(widget, "pnlHonorInfo/pnlContainer/HonorList"); if (gameObject == null) { return; } CUIListScript component = gameObject.GetComponent <CUIListScript>(); if (component == null) { return; } int selectedIndex = component.GetSelectedIndex(); if (uiEvent.m_srcFormScript == null || selectedIndex < 0 || selectedIndex >= this.m_honorInfoList.get_Count()) { return; } COMDT_HONORINFO cOMDT_HONORINFO = this.m_honorInfoList.get_Item(selectedIndex); if (cOMDT_HONORINFO == null) { return; } if (cOMDT_HONORINFO.iHonorLevel <= 0) { return; } CSPkg cSPkg = NetworkModule.CreateDefaultCSPKG(1416u); CSPKG_USEHONOR_REQ stUseHonorReq = cSPkg.stPkgData.stUseHonorReq; stUseHonorReq.iHonorID = cOMDT_HONORINFO.iHonorID; Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref cSPkg, true); }
public void UpdateUI() { CUIFormScript form = Singleton <CUIManager> .get_instance().GetForm(CPlayerCommonHeroInfoController.sPlayerInfoCommonHeroFormPath); if (form == null) { return; } GameObject widget = form.GetWidget(0); CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(widget, "SubMenuList/List"); CUIListScript componetInChild2 = Utility.GetComponetInChild <CUIListScript>(widget, "DetailList/MenuList"); CUIListScript componetInChild3 = Utility.GetComponetInChild <CUIListScript>(widget, "DetailList/List"); Text componetInChild4 = Utility.GetComponetInChild <Text>(widget, "SubMenuList/Button_Down/Text"); int selectedIndex = componetInChild.GetSelectedIndex(); int selectedIndex2 = componetInChild2.GetSelectedIndex(); componetInChild.gameObject.CustomSetActive(false); componetInChild4.text = CPlayerCommonHeroInfoController.sSubTitles[selectedIndex]; componetInChild3.SetElementAmount(this.m_commonHeroList.get_Count()); }
private void OnMenuSelect(CUIEvent uiEvent) { CUIFormScript srcFormScript = uiEvent.m_srcFormScript; if ((srcFormScript != null) && (srcFormScript.transform.Find(s_symbolEquipPanel) != null)) { CUIListScript component = uiEvent.m_srcWidget.GetComponent <CUIListScript>(); if (null != component) { int selectedIndex = component.GetSelectedIndex(); this.m_selectMenuType = (enSymbolMenuType)selectedIndex; Transform transform = srcFormScript.transform; if (this.m_selectMenuType == enSymbolMenuType.SymbolEquip) { transform.Find(s_symbolEquipPanel).gameObject.CustomSetActive(true); transform.Find(s_symbolMakePanel).gameObject.CustomSetActive(false); srcFormScript.GetWidget(9).CustomSetActive(false); this.m_symbolWearCtrl.SwitchToSymbolWearPanel(uiEvent); } else if (this.m_selectMenuType == enSymbolMenuType.SymbolMake) { transform.Find(s_symbolEquipPanel).gameObject.CustomSetActive(false); transform.Find(s_symbolMakePanel).gameObject.CustomSetActive(true); srcFormScript.GetWidget(9).CustomSetActive(false); this.m_symbolMakeCtrl.SwitchToSymbolMakePanel(uiEvent); } else if (this.m_selectMenuType == enSymbolMenuType.SymbolRecommend) { transform.Find(s_symbolEquipPanel).gameObject.CustomSetActive(false); transform.Find(s_symbolMakePanel).gameObject.CustomSetActive(false); srcFormScript.GetWidget(9).CustomSetActive(true); this.m_symbolRcmdCtrl.SwitchToSymbolRcmdPanel(uiEvent); Singleton <CMiShuSystem> .GetInstance().HideNewFlag(component.GetElemenet(1).gameObject, enNewFlagKey.New_BtnSymbolFlagKey_V1); Singleton <CBattleGuideManager> .GetInstance().OpenBannerDlgByBannerGuideId(7, null); } uiEvent.m_srcFormScript.GetWidget(1).CustomSetActive(this.m_selectMenuType == enSymbolMenuType.SymbolEquip); uiEvent.m_srcFormScript.GetWidget(8).CustomSetActive(this.m_selectMenuType != enSymbolMenuType.SymbolEquip); } } }
private void UpdateSortMenu() { CUIFormScript form = Singleton <CUIManager> .get_instance().GetForm(CPlayerCommonHeroInfoController.sPlayerInfoCommonHeroFormPath); if (form == null) { return; } GameObject widget = form.GetWidget(0); CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(widget, "DetailList/MenuList"); int selectedIndex = componetInChild.GetSelectedIndex(); if (this.m_lastSortIndex != selectedIndex) { this.m_lastIsUp = 0; } else { this.m_lastIsUp = ((this.m_lastIsUp != 1) ? 1 : 0); } this.m_lastSortIndex = selectedIndex; int elementAmount = componetInChild.m_elementAmount; for (int i = 0; i < elementAmount; i++) { GameObject gameObject = componetInChild.GetElemenet(i).gameObject; GameObject obj = Utility.FindChild(gameObject, "Text/Up"); GameObject obj2 = Utility.FindChild(gameObject, "Text/Down"); if (i == selectedIndex) { obj.CustomSetActive(this.m_lastIsUp == 1); obj2.CustomSetActive(this.m_lastIsUp != 1); } else { obj.CustomSetActive(false); obj2.CustomSetActive(false); } } }
protected void OnBttleHeroInfoTabChange(CUIEvent uiEvent) { CUIListScript component = uiEvent.m_srcWidget.GetComponent <CUIListScript>(); if (component != null) { int selectedIndex = component.GetSelectedIndex(); if (this.m_FormScript != null) { if (selectedIndex == 0) { this.m_FormScript.m_formWidgets[2].CustomSetActive(true); this.m_FormScript.m_formWidgets[1].CustomSetActive(false); } else { this.m_FormScript.m_formWidgets[2].CustomSetActive(false); this.m_FormScript.m_formWidgets[1].CustomSetActive(true); } } } }