public string GetSortTypeName(CMallSortHelper.HeroSortType sortType = CMallSortHelper.HeroSortType.Default) { if (sortType < CMallSortHelper.HeroSortType.Default || sortType > (CMallSortHelper.HeroSortType)CMallSortHelper.heroSortTypeNameKeys.Length) { return(null); } return(Singleton <CTextManager> .GetInstance().GetText(CMallSortHelper.heroSortTypeNameKeys[(int)sortType])); }
public override void UnInit() { base.UnInit(); this.m_sortType = CMallSortHelper.HeroSortType.Default; this.m_desc = false; this.m_roleInfo = null; this.m_culture = null; }
public override void Init() { base.Init(); this.m_sortType = CMallSortHelper.HeroSortType.Default; this.m_desc = false; this.m_roleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); this.m_culture = new CultureInfo("zh-CN"); }
private void RealIndexGetReady(bool forceUpdate = false) { if (!forceUpdate && this._curFilterJob == this._curJobView && this._curFilterMenuPage == this._curMenuPage && ((this._curFilterMenuPage == GiftCenter.MenuPage.Hero && this._curFilterHeroSortType == this._curHeroSortType) || (this._curFilterMenuPage == GiftCenter.MenuPage.Skin && this._curFilterSkinSortType == this._curSkinSortType))) { return; } this._curFilterJob = this._curJobView; this._curFilterMenuPage = this._curMenuPage; int num = 0; if (this._curMenuPage == GiftCenter.MenuPage.Skin) { this._curFilterSkinSortType = this._curSkinSortType; this.CleanSortSkinList(); for (int i = 0; i < this._skinTotalNum; i++) { ResHeroSkin resHeroSkin = this._skinList[i]; ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(resHeroSkin.dwHeroID); if (dataByKey.bMainJob == (byte)this._curJobView || dataByKey.bMinorJob == (byte)this._curJobView) { if (num < this._filterTempList.get_Count()) { this._filterTempList.set_Item(num, i); } else { this._filterTempList.Add(i); } num++; } } this._tempListNum = num; } else { this._curFilterHeroSortType = this._curHeroSortType; this.CleanSortHeroList(); for (int j = 0; j < this._heroTotalNum; j++) { ResHeroCfgInfo resHeroCfgInfo = this._heroList[j]; if (resHeroCfgInfo.bMainJob == (byte)this._curJobView || resHeroCfgInfo.bMinorJob == (byte)this._curJobView) { if (num < this._filterTempList.get_Count()) { this._filterTempList.set_Item(num, j); } else { this._filterTempList.Add(j); } num++; } } this._tempListNum = num; } }
public string GetSortTypeName(CMallSortHelper.HeroSortType sortType = 0) { int num = (int)sortType; if ((num >= 0) && (num <= CMallSortHelper.heroSortTypeNameKeys.Length)) { return(Singleton <CTextManager> .GetInstance().GetText(CMallSortHelper.heroSortTypeNameKeys[(int)sortType])); } return(null); }
private void RealIndexGetReady(bool forceUpdate = false) { if (((forceUpdate || (this._curFilterJob != this._curJobView)) || (this._curFilterMenuPage != this._curMenuPage)) || (((this._curFilterMenuPage != MenuPage.Hero) || (this._curFilterHeroSortType != this._curHeroSortType)) && ((this._curFilterMenuPage != MenuPage.Skin) || (this._curFilterSkinSortType != this._curSkinSortType)))) { this._curFilterJob = this._curJobView; this._curFilterMenuPage = this._curMenuPage; int num = 0; if (this._curMenuPage == MenuPage.Skin) { this._curFilterSkinSortType = this._curSkinSortType; this.CleanSortSkinList(); for (int i = 0; i < this._skinTotalNum; i++) { ResHeroSkin skin = this._skinList[i]; ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(skin.dwHeroID); if ((dataByKey.bMainJob == ((byte)this._curJobView)) || (dataByKey.bMinorJob == ((byte)this._curJobView))) { if (num < this._filterTempList.Count) { this._filterTempList[num] = i; } else { this._filterTempList.Add(i); } num++; } } this._tempListNum = num; } else { this._curFilterHeroSortType = this._curHeroSortType; this.CleanSortHeroList(); for (int j = 0; j < this._heroTotalNum; j++) { ResHeroCfgInfo info2 = this._heroList[j]; if ((info2.bMainJob == ((byte)this._curJobView)) || (info2.bMinorJob == ((byte)this._curJobView))) { if (num < this._filterTempList.Count) { this._filterTempList[num] = j; } else { this._filterTempList.Add(j); } num++; } } this._tempListNum = num; } } }
private void SetCurSortType() { if (this._sortList.GetSelectedIndex() == 3) { this._curHeroSortType = CMallSortHelper.HeroSortType.ReleaseTime; this._curSkinSortType = CMallSortHelper.SkinSortType.ReleaseTime; } else { this._curHeroSortType = (CMallSortHelper.HeroSortType) this._sortList.GetSelectedIndex(); this._curSkinSortType = (CMallSortHelper.SkinSortType) this._sortList.GetSelectedIndex(); } }
private void OnMenuChanged(CUIEvent uiEvent) { if (this._menuList != null) { int selectedIndex = this._menuList.GetSelectedIndex(); this._curMenuPage = (MenuPage)selectedIndex; this._curSkinSortType = CMallSortHelper.SkinSortType.Default; this._curHeroSortType = CMallSortHelper.HeroSortType.Default; this.SetSortContent(); if (this._curJobView != enHeroJobType.All) { this.RealIndexGetReady(false); } this.UpdateItemList(); } }
public void SetSortType(CMallSortHelper.HeroSortType sortType = CMallSortHelper.HeroSortType.Default) { if (sortType != CMallSortHelper.HeroSortType.Default) { if (this.m_sortType != sortType) { this.m_desc = false; } else { this.m_desc = !this.m_desc; } } else { this.m_desc = false; } this.m_sortType = sortType; }