private void ClickList(IUIObject obj) { if (obj == null) { return; } BookmarkDlg.TYPE key = (BookmarkDlg.TYPE)((int)obj.Data); if (null != base.InteractivePanel) { base.InteractivePanel.depthChangeable = true; } if (NrTSingleton <FormsManager> .Instance.GetForm((G_ID)this.m_nWinID) != null) { UI_UIGuide uI_UIGuide = NrTSingleton <FormsManager> .Instance.GetForm((G_ID)this.m_nWinID) as UI_UIGuide; if (uI_UIGuide != null) { uI_UIGuide.CloseUI = true; } this.DeleteTouch(); } if (this.mapFun.ContainsKey(key)) { this.mapFun[key](null); } if (null != this._Touch) { this.DeleteTouch(); } }
public bool IsListAdd(BookmarkDlg.TYPE eTYPE) { for (int i = 0; i < this.bookmarkList.Count; i++) { UIListItemContainer item = this.bookmarkList.GetItem(i); if (!(null == item)) { if (item.Data != null) { if (eTYPE == (BookmarkDlg.TYPE)((int)item.Data)) { return(true); } } } } return(false); }
public void ShowUIGuide(string param1, string param2, int winID) { if (null != base.InteractivePanel) { base.InteractivePanel.depthChangeable = false; } this.m_nWinID = winID; this.oldZ = base.GetLocation().z; base.SetLocation(base.GetLocationX(), base.GetLocationY(), NrTSingleton <FormsManager> .Instance.GetTopMostZ() + 1f); BookmarkDlg.TYPE tYPE = (BookmarkDlg.TYPE)((int)Enum.Parse(typeof(BookmarkDlg.TYPE), param1)); this._GuideItem = this.bookmarkList.GetItem((int)tYPE); UIButton uIButton = this._GuideItem.GetElement(0) as UIButton; if (null != uIButton) { uIButton.EffectAni = false; } this._ButtonZ = this._GuideItem.gameObject.transform.localPosition.z; this._GuideItem.gameObject.transform.localPosition = new Vector3(this._GuideItem.gameObject.transform.localPosition.x, this._GuideItem.gameObject.transform.localPosition.y, -3f); if (!this.hide) { this._GuideItem.AlphaAni(1f, 0.5f, -0.5f); } this.bookmarkList.ScrollPosition = (float)tYPE / 8f; this.bookmarkList.RepositionItems(); if (null == this._Touch) { this._Touch = UICreateControl.Button("touch", "Main_I_Touch01", 196f, 154f); this._Touch.PlayAni(true); base.InteractivePanel.MakeChild(this._Touch.gameObject); float y = this.bookmarkList.viewableArea.y / 2f - this._GuideItem.gameObject.transform.localPosition.y - this.bookmarkList.MoverPosY(); this._Touch.SetLocation(-this._Touch.GetSize().x + 75f, y, this._GuideItem.gameObject.transform.localPosition.z - 1f); BoxCollider component = this._Touch.gameObject.GetComponent <BoxCollider>(); if (null != component) { UnityEngine.Object.Destroy(component); } } if (this.hide) { this.Move(); } this.bookmarkList.touchScroll = false; }
public void UpdateBookmarkInfo(BookmarkDlg.TYPE type) { for (int i = 0; i < this.bookmarkList.Count; i++) { IUIObject item = this.bookmarkList.GetItem(i); if (item != null) { BookmarkDlg.TYPE tYPE = (BookmarkDlg.TYPE)((int)item.Data); if (tYPE == type) { ListItem listItem = this.GetListItem(type); this.bookmarkList.RemoveAdd(i, listItem); break; } } } this.bookmarkList.RepositionItems(); this.bookmarkList.clipWhenMoving = true; if (null != this._GuideItem) { this._GuideItem.gameObject.transform.localPosition = new Vector3(this._GuideItem.gameObject.transform.localPosition.x, this._GuideItem.gameObject.transform.localPosition.y, -3f); } }
private ListItem GetListItem(BookmarkDlg.TYPE type) { ListItem listItem = new ListItem(); switch (type) { case BookmarkDlg.TYPE.HERO: { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo != null) { listItem.SetColumnGUIContent(0, string.Empty, "Main_B_CharInfoBM", type, new EZValueChangedDelegate(this.ClickList)); listItem.SetColumnGUIContent(1, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1490")); bool flag = false; if (0 < charPersonInfo.GetUpgradeBattleSkillNum()) { flag = true; } if (flag) { listItem.SetColumnGUIContent(2, string.Empty, "Win_I_Notice01"); listItem.SetColumnGUIContent(3, string.Empty, "Win_I_Notice04"); } listItem.Key = type; } break; } case BookmarkDlg.TYPE.ADVENTURE: { listItem.SetColumnGUIContent(0, string.Empty, "Main_B_WorldMapBM", type, new EZValueChangedDelegate(this.ClickList)); listItem.SetColumnGUIContent(1, string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("2002"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3459"))); bool flag2 = false; if (NrTSingleton <NkAdventureManager> .Instance.IsAcceptQuest()) { flag2 = true; } if (NrTSingleton <NrTable_BurnningEvent_Manager> .Instance.IsGet_DailyDungeonReward()) { flag2 = true; } if (flag2) { listItem.SetColumnGUIContent(2, string.Empty, "Win_I_Notice01"); listItem.SetColumnGUIContent(3, string.Empty, "Win_I_Notice04"); } listItem.Key = type; break; } case BookmarkDlg.TYPE.BATTLE: { listItem.SetColumnGUIContent(0, string.Empty, "Main_B_InfiBattleBM", type, new EZValueChangedDelegate(this.ClickList)); listItem.SetColumnGUIContent(1, string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("2002"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3460"))); bool flag3 = false; if (NrTSingleton <MythRaidManager> .Instance.CanGetReward) { flag3 = true; } NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo(); if (myCharInfo != null) { if (myCharInfo.InfiBattleReward == 0) { flag3 = true; } if (myCharInfo.ColosseumOldRank > 0) { flag3 = true; } } if (NrTSingleton <NewExplorationManager> .Instance.CanGetTreasureData() != null || NrTSingleton <NewExplorationManager> .Instance.CanGetEndReward()) { flag3 = true; } if (flag3) { listItem.SetColumnGUIContent(2, string.Empty, "Win_I_Notice01"); listItem.SetColumnGUIContent(3, string.Empty, "Win_I_Notice04"); } listItem.Key = type; break; } case BookmarkDlg.TYPE.NEWGUILD: listItem.SetColumnGUIContent(0, string.Empty, "Main_B_GuildBM", BookmarkDlg.TYPE.NEWGUILD, new EZValueChangedDelegate(this.ClickNewGuild)); listItem.SetColumnGUIContent(1, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("17")); if (0L < NrTSingleton <NewGuildManager> .Instance.GetGuildID()) { int num = NrTSingleton <NewGuildManager> .Instance.GetReadyApplicantCount(); bool flag4 = false; bool guildBossRewardInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetGuildBossRewardInfo(); if (guildBossRewardInfo) { flag4 = true; } bool guildBossCheck = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetGuildBossCheck(); if (guildBossCheck) { flag4 = true; } bool flag5 = NrTSingleton <NewGuildManager> .Instance.CanGetGoldenEggReward(); if (flag5) { flag4 = true; } if (0 < num || flag4) { if (99 < num) { num = 99; } if (0 < num) { listItem.SetColumnGUIContent(2, string.Empty, "Win_I_Notice01"); listItem.SetColumnStr(3, NrTSingleton <CTextParser> .Instance.GetTextColor("1002") + num.ToString()); } else if (flag4) { listItem.SetColumnGUIContent(2, string.Empty, "Win_I_Notice04"); } } else if (NrTSingleton <GuildWarManager> .Instance.CanGetGuildWarReward()) { listItem.SetColumnGUIContent(2, string.Empty, "Win_I_Notice04"); } } listItem.Key = type; break; case BookmarkDlg.TYPE.INVEN: listItem.SetColumnGUIContent(0, string.Empty, "Main_B_InventoryBM", type, new EZValueChangedDelegate(this.ClickList)); listItem.SetColumnGUIContent(1, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1771")); listItem.Key = type; break; case BookmarkDlg.TYPE.COMMUNITY: listItem.SetColumnGUIContent(0, string.Empty, "Main_B_FriendBM", type, new EZValueChangedDelegate(this.ClickList)); listItem.SetColumnGUIContent(1, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("210")); if (0 < NrTSingleton <NkCharManager> .Instance.AddExpHelpsolCount()) { listItem.SetColumnGUIContent(2, string.Empty, "Win_I_Notice01"); listItem.SetColumnStr(3, NrTSingleton <CTextParser> .Instance.GetTextColor("1002") + string.Format("{0}", NrTSingleton <NkCharManager> .Instance.AddExpHelpsolCount())); } listItem.Key = type; break; case BookmarkDlg.TYPE.HEROBATTLE: if (NrTSingleton <ContentsLimitManager> .Instance.IsHeroBattle()) { listItem.SetColumnGUIContent(0, string.Empty, "Main_B_InfiBattleBM", type, new EZValueChangedDelegate(this.ClickList)); listItem.SetColumnGUIContent(1, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("43")); listItem.Key = type; } else { listItem = null; } break; case BookmarkDlg.TYPE.EXPLORATION: if (NrTSingleton <ContentsLimitManager> .Instance.IsExploration()) { listItem.SetColumnGUIContent(0, string.Empty, "Main_B_ExploreBM", type, new EZValueChangedDelegate(this.ClickList)); listItem.SetColumnGUIContent(1, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("846")); listItem.Key = type; } else { listItem = null; } break; default: listItem = null; break; } return(listItem); }