Exemple #1
0
 public virtual void RemoveItemAt(int index)
 {
     if (index > ItemsCount - 1)
     {
         return;
     }
     ItemsCollection.RemoveAt(index);
     // TODO : THINK ABOUT CHANGING STRATEGY AND MAKING USE OF LayoutGroups !
     if (index > firstItemIndex && index < LastItemIndex)
     {
         // remove item from screen
         for (int i = index; i < LastItemIndex && i < contentRect.childCount; i++)
         {
             Transform           itemTransform = contentRect.GetChild(i);
             ObservableComponent item          = itemTransform.GetComponent <ObservableComponent>();
             item.Info = itemsCollection[i];
         }
     }
 }