public UIIconTableElement RemoveIcon(UIIconTableElement element) { allIcons.Remove(element); element.gameObject.SetActive(false); element.transform.SetParent(UIMainCanvas.instance.transform); UpdateElementLayout();//true); return(null); }
public UIIconTableElement AddIcon(Sprite iconSprite) { UIIconTableElement newElement = pool.GetAvailable(settings.iconTableElement, null, false, null); newElement.SetIconSprite(iconSprite); newElement.transform.SetParent(transform, Vector3.zero, Quaternion.identity, Vector3.one); newElement.gameObject.SetActive(true); allIcons.Add(newElement); UpdateElementLayout();//true); return(newElement); }
public static UIIconTableElement RemoveIconFromTable(UIIconTableElement icon) { return(iconTable.RemoveIcon(icon)); }