private void PlaceItems() { if (this.grid == null) { this.grid = base.GetComponent<GridPlaceItems>(); } this.grid.SetItemsPosition(this.items); }
private void Start() { this.gp = base.GetComponent<GridPlaceItems>(); List<GameObject> items = new List<GameObject>(); for (int i = 1; i <= 6; i++) { GameObject item = GameObjectUtil.InstantiateItemAsChildOf(this.shipSortBtnPrefab, base.gameObject); item.GetComponent<ShipSortButton>().SetSortType((ShipSortTypes) i); items.Add(item); } this.gp.SetItemsPosition(items); }
private void Start() { this.gp = base.GetComponent<GridPlaceItems>(); List<GameObject> items = new List<GameObject>(); for (int i = 0; i <= 14; i++) { GameObject item = GameObjectUtil.InstantiateItemAsChildOf(this.euipFilterBtnPrefab, base.gameObject); item.GetComponent<EquipFilterBtn>().SetFilterType((EquipmentType) i); items.Add(item); } this.gp.SetItemsPosition(items); }
private void Start() { this.ts = base.GetComponent<tk2dSlicedSprite>(); if (this.ts != null) { this.ts.dimensions = new Vector2(this.ts.dimensions.x, 322f); } this.gp = base.GetComponent<GridPlaceItems>(); List<GameObject> items = new List<GameObject>(); for (int i = 0; i <= 0x11; i++) { GameObject item = GameObjectUtil.InstantiateItemAsChildOf(this.shipFilterBtnPrefab, base.gameObject); item.GetComponent<ShipFilterBtn>().SetFilterType((ShipType) i); items.Add(item); } this.gp.SetItemsPosition(items); }
private void PlaceItems() { if (this.grid == null) { this.grid = base.GetComponent<GridPlaceItems>(); } this.grid.SetItemsPosition(this.items); if (this.grid.horizontal) { this.scrollArea.ContentLength = this.grid.GetLength(this.items); } else { this.scrollArea.ContentLength = this.grid.GetHeight(this.items); } if (this.adjustScrollBar != null) { this.adjustScrollBar.UpdateSize(this.scrollArea.ContentLength, this.scrollArea.VisibleAreaLength); } }