public override bool IsDependent(UIBatchSorting.SortItem other)
 {
     return System.Array.FindIndex(Group, depth => {return depth == ((TestSortItem)other).Depth;}) != -1;
 }
 public override int CompareTo(UIBatchSorting.SortItem other)
 {
     return this.Depth.CompareTo(((TestSortItem)other).Depth);
 }
 public override bool IsDependent(UIBatchSorting.SortItem other)
 {
     return Border.Overlaps(((UIWidgetSortItem)other).Border);
 }
 static void PrintDrawcall(UIBatchSorting.SortItem[] items)
 {
     var start = 0;
     var index = 1;
     for (var i = 0; i < items.Length; ++i)
     {
         if (items[i].Key == items[start].Key)
             continue;
         Debug.Log(string.Format("{0}\t{1}\t{2}\t{3}", index, i - start, items[start].ToString(), items[start].Key));
         start = i;
         index++;
     }
     Debug.Log(string.Format("{0}\t{1}\t{2}\t{3}", index, items.Length - start, items[start].ToString(), items[start].Key));
 }
 public override int CompareTo(UIBatchSorting.SortItem other)
 {
     // return UIWidget.PanelCompareFunc(this.Widget, ((UIWidgetSortItem)other).Widget);
     return PanelCompareFunc(this.Widget, ((UIWidgetSortItem)other).Widget);
 }