// Token: 0x06002C23 RID: 11299 RVA: 0x0048741C File Offset: 0x0048561C private void ChangeTag(UIBookMark.ClickType Tag, bool bForceUpdatge = false, bool bForceMoveBegin = true) { if (!bForceUpdatge && Tag == this.CurrentTag) { return; } if (!bForceUpdatge || Tag != this.CurrentTag) { UIBookMark.ClickType currentTag = this.CurrentTag; this.BookTag[(int)((byte)this.CurrentTag)].alpha = 0f; this.CurrentTag = Tag; this.BookTagText[(int)((byte)currentTag)].color = this.TabTextColor; this.BookTagText[(int)((byte)this.CurrentTag)].color = Color.white; } else { this.BookTagText[(int)((byte)this.CurrentTag)].color = Color.white; } DataManager instance = DataManager.Instance; int itemidx = 0; Vector2 vector = Vector2.zero; if (!bForceMoveBegin) { itemidx = this.BookScrollView.GetBeginIdx(); vector = this.BookScrollRect.anchoredPosition; } this.ItemsHeight.Clear(); int currentTag2 = (int)this.CurrentTag; this.KindData = instance.RoleBookMark.KindDataIDIndex[(int)this.TypeId[currentTag2]]; if (this.CurrentTag == UIBookMark.ClickType.TabAll) { this.DataCount = (byte)instance.RoleAttr.BookmarkNum; } else { this.DataCount = instance.RoleBookMark.KindDataCount[(int)this.TypeId[currentTag2]]; } for (byte b = 0; b < this.DataCount; b += 1) { this.ItemsHeight.Add(83f); } if (this.ItemsHeight.Count == 0) { this.BookScrollView.gameObject.SetActive(false); this.MessageTrans.gameObject.SetActive(true); } else { this.MessageTrans.gameObject.SetActive(false); this.BookScrollView.gameObject.SetActive(true); this.BookScrollView.AddNewDataHeight(this.ItemsHeight, true, true); } if (!bForceMoveBegin) { this.BookScrollView.GoTo(itemidx, vector.y); } }
// Token: 0x06002C26 RID: 11302 RVA: 0x00487AC4 File Offset: 0x00485CC4 public override void UpdateUI(int arge1, int arge2) { UIBookMark.ClickType clickType = this.CurrentAllianceTag; UIBookMark.ClickType roleSubTag = this.CurrentTag; if (arge1 > 0) { clickType = (UIBookMark.ClickType)(arge1 >> 16); roleSubTag = (UIBookMark.ClickType) this.TypeId[arge1 & 65535]; } this.ChangeAllianceTag(clickType, roleSubTag, true, false); if (arge2 > 0) { this.BookScrollView.GoTo(this.getBookMarkIndex(arge1, arge2, clickType)); } }
// Token: 0x06002C28 RID: 11304 RVA: 0x00487B84 File Offset: 0x00485D84 private int getBookMarkIndex(int type, int mapID, UIBookMark.ClickType bookType) { BookMark roleBookMark = DataManager.Instance.RoleBookMark; if (bookType == UIBookMark.ClickType.RoleTag) { if (roleBookMark.KindDataCount.Length <= type) { return(0); } for (int i = (int)(roleBookMark.KindDataCount[type] - 1); i >= 0; i--) { if (roleBookMark.AllData[(int)roleBookMark.KindDataIDIndex[type][i]].MapID == mapID) { int num = (int)roleBookMark.KindDataCount[type] - i - 3; if (num < 0) { num = 0; } if ((int)(roleBookMark.KindDataCount[type] - 6) < num) { num = (int)(roleBookMark.KindDataCount[type] - 6); } return(num); } } } else if (bookType == UIBookMark.ClickType.AllianceTag) { for (int j = (int)(roleBookMark.AllianceBookCount - 1); j >= 0; j--) { if (roleBookMark.AllAllianceData[(int)roleBookMark.AllianceIDIndex[j]].MapID == mapID) { int num2 = (int)roleBookMark.AllianceBookCount - j - 3; if (num2 < 0) { num2 = 0; } if ((int)(roleBookMark.AllianceBookCount - 6) < num2) { num2 = (int)(roleBookMark.AllianceBookCount - 6); } return(num2); } } } return(0); }
// Token: 0x06002C24 RID: 11300 RVA: 0x00487608 File Offset: 0x00485808 private void ChangeAllianceTag(UIBookMark.ClickType Tag, UIBookMark.ClickType RoleSubTag, bool bForceUpdatge = false, bool bForceMoveBegin = true) { if (!bForceUpdatge && Tag == this.CurrentAllianceTag) { return; } if (DataManager.Instance.RoleAlliance.Id == 0u && Tag == UIBookMark.ClickType.AllianceTag) { Door door = GUIManager.Instance.FindMenu(EGUIWindow.Door) as Door; DataManager.Instance.SetSelectRequest = 0; door.OpenMenu(EGUIWindow.UI_AllianceHint, 0, 0, false); return; } bool bForceUpdatge2 = false; if (!bForceUpdatge || Tag != this.CurrentAllianceTag) { if (Tag != this.CurrentAllianceTag) { bForceUpdatge2 = true; } UIBookMark.ClickType currentAllianceTag = this.CurrentAllianceTag; this.AllianceTag[currentAllianceTag - UIBookMark.ClickType.RoleTag].alpha = 0f; this.CurrentAllianceTag = Tag; } else { bForceUpdatge2 = bForceUpdatge; } DataManager instance = DataManager.Instance; if (this.CurrentAllianceTag == UIBookMark.ClickType.RoleTag) { this.BookTagObj.SetActive(true); } else { this.BookTagObj.SetActive(false); } this.PageInfoStr.ClearString(); if (this.CurrentAllianceTag == UIBookMark.ClickType.RoleTag) { this.MainTitle.text = instance.mStringTable.GetStringByID(4583u); this.MessageText.text = instance.mStringTable.GetStringByID(790u); this.PageInfoStr.IntToFormat((long)instance.RoleAttr.BookmarkNum, 1, false); this.PageInfoStr.IntToFormat((long)instance.RoleAttr.BookmarkLimit, 1, false); } else { this.MainTitle.text = instance.mStringTable.GetStringByID(12636u); this.MessageText.text = instance.mStringTable.GetStringByID(12630u); this.PageInfoStr.IntToFormat((long)instance.RoleBookMark.AllianceBookCount, 1, false); this.PageInfoStr.IntToFormat(20L, 1, false); } if (GUIManager.Instance.IsArabic) { this.PageInfoStr.AppendFormat("{1} / {0}"); } else { this.PageInfoStr.AppendFormat("{0} / {1}"); } this.PageInfo.text = this.PageInfoStr.ToString(); this.PageInfo.SetAllDirty(); this.PageInfo.cachedTextGenerator.Invalidate(); if (Tag == UIBookMark.ClickType.RoleTag) { this.ChangeTag(RoleSubTag, bForceUpdatge2, bForceMoveBegin); return; } int itemidx = 0; Vector2 vector = Vector2.zero; if (!bForceMoveBegin) { itemidx = this.BookScrollView.GetBeginIdx(); vector = this.BookScrollRect.anchoredPosition; } this.ItemsHeight.Clear(); this.KindData = instance.RoleBookMark.AllianceIDIndex; this.DataCount = instance.RoleBookMark.AllianceBookCount; for (byte b = 0; b < this.DataCount; b += 1) { this.ItemsHeight.Add(83f); } if (this.ItemsHeight.Count == 0) { this.BookScrollView.gameObject.SetActive(false); this.MessageTrans.gameObject.SetActive(true); } else { this.MessageTrans.gameObject.SetActive(false); this.BookScrollView.gameObject.SetActive(true); this.BookScrollView.AddNewDataHeight(this.ItemsHeight, true, true); } if (!bForceMoveBegin) { this.BookScrollView.GoTo(itemidx, vector.y); } }