예제 #1
0
 public UIIconTableElement RemoveIcon(UIIconTableElement element)
 {
     allIcons.Remove(element);
     element.gameObject.SetActive(false);
     element.transform.SetParent(UIMainCanvas.instance.transform);
     UpdateElementLayout();//true);
     return(null);
 }
예제 #2
0
        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);
        }
예제 #3
0
 public static UIIconTableElement RemoveIconFromTable(UIIconTableElement icon)
 {
     return(iconTable.RemoveIcon(icon));
 }