public void Setup(MenuItem currentItem, TryoutsScrollList currentScrollList) { this.item = currentItem; this.nameLabel.text = this.item.Name; this.iconImage.sprite = this.item.Icon; this.scrollList = currentScrollList; }
private void RemoveItem(MenuItem itemToRemove, TryoutsScrollList scrollList) { for (int i = scrollList.itemList.Count - 1; i >= 0; i--) { if (scrollList.itemList.ElementAt(i) == itemToRemove) { scrollList.itemList.Remove(itemToRemove); } } }
private void AddItem(MenuItem itemToAdd, TryoutsScrollList scrollList) { scrollList.itemList.Add(itemToAdd); }