// Token: 0x0600088F RID: 2191 RVA: 0x00024DB4 File Offset: 0x000231B4 public void Reset() { this._index = 0; for (int i = 0; i < this._colorButtons.Count; i++) { this._colorButtons[i].transform.localPosition = new Vector2(10000f, 10000f); this._colorButtons[i].transform.localScale = Vector2.one; this._colorButtons[i].transform.SetParent(base.transform); UIColorCellButton component = this._colorButtons[i].GetComponent <UIColorCellButton>(); component.Reset(); } }
// Token: 0x060009A1 RID: 2465 RVA: 0x00029924 File Offset: 0x00027D24 private UIColorCellButton AddColorButton(int colorIndex, Color c) { RectTransform component = this._grid.GetComponent <RectTransform>(); Transform colorButton = ColorButtonPoolManager.Instance.GetColorButton(); colorButton.SetParent(component); colorButton.localScale = Vector3.one; UIColorCellButton component2 = colorButton.GetComponent <UIColorCellButton>(); component2.Init(colorIndex, c); return(component2); }
// Token: 0x0600099E RID: 2462 RVA: 0x000296F4 File Offset: 0x00027AF4 public void RefershDrawPen(string TID) { this.InitColorData(TID); bool flag = PlayerManager.Instance.IsShowBanner(); Transform transform = this._gamePanel.transform.Find("Bottom"); Transform transform2 = this._gamePanel.transform.Find("Bottom_Banner"); Transform transform3; Transform transform4; if (flag) { transform.gameObject.SetActive(false); transform2.gameObject.SetActive(true); this._bottomScrollView = transform2.Find("BottomScrollView"); this._grid = this._bottomScrollView.Find("Viewport/Grid"); transform3 = transform2.Find("EraserButton"); transform4 = transform2.Find("BottomBarBg"); } else { transform.gameObject.SetActive(true); transform2.gameObject.SetActive(false); this._bottomScrollView = transform.Find("BottomScrollView"); this._grid = this._bottomScrollView.Find("Viewport/Grid"); transform3 = transform.Find("EraserButton"); transform4 = transform.Find("BottomBarBg"); } ColorButtonPoolManager.Instance.Reset(); this._listButton.Clear(); UIColorCellButton component = transform3.GetComponent <UIColorCellButton>(); component.Init(0, Color.white); this._listButton.Add(component); for (int i = 0; i < this._listColor.Count; i++) { UIColorCellButton item = this.AddColorButton(i + 1, this._listColor[i]); this._listButton.Add(item); } Button component2 = transform4.GetComponent <Button>(); component2.onClick.AddListener(delegate { this.OnBottomBarBgButtonClick(base.gameObject); }); this.selectedPenColor = 1; this.SetUIButtonSelected(this.selectedPenColor); }