示例#1
0
 private void CleanInvalidItems()
 {
     for (int i = this.m_LayoutRebuildQueue.Count - 1; i >= 0; i--)
     {
         ICanvasElement canvasElement = this.m_LayoutRebuildQueue[i];
         if (canvasElement == null)
         {
             this.m_LayoutRebuildQueue.RemoveAt(i);
         }
         else if (canvasElement.IsDestroyed())
         {
             this.m_LayoutRebuildQueue.RemoveAt(i);
             canvasElement.LayoutComplete();
         }
     }
     for (int j = this.m_GraphicRebuildQueue.Count - 1; j >= 0; j--)
     {
         ICanvasElement canvasElement2 = this.m_GraphicRebuildQueue[j];
         if (canvasElement2 == null)
         {
             this.m_GraphicRebuildQueue.RemoveAt(j);
         }
         else if (canvasElement2.IsDestroyed())
         {
             this.m_GraphicRebuildQueue.RemoveAt(j);
             canvasElement2.GraphicUpdateComplete();
         }
     }
 }
示例#2
0
 private void CleanInvalidItems()
 {
     for (int num = m_LayoutRebuildQueue.Count - 1; num >= 0; num--)
     {
         ICanvasElement canvasElement = m_LayoutRebuildQueue[num];
         if (canvasElement == null)
         {
             m_LayoutRebuildQueue.RemoveAt(num);
         }
         else if (canvasElement.IsDestroyed())
         {
             m_LayoutRebuildQueue.RemoveAt(num);
             canvasElement.LayoutComplete();
         }
     }
     for (int num2 = m_GraphicRebuildQueue.Count - 1; num2 >= 0; num2--)
     {
         ICanvasElement canvasElement2 = m_GraphicRebuildQueue[num2];
         if (canvasElement2 == null)
         {
             m_GraphicRebuildQueue.RemoveAt(num2);
         }
         else if (canvasElement2.IsDestroyed())
         {
             m_GraphicRebuildQueue.RemoveAt(num2);
             canvasElement2.GraphicUpdateComplete();
         }
     }
 }
示例#3
0
 private void CleanInvalidItems()
 {
     for (int index = this.m_LayoutRebuildQueue.Count - 1; index >= 0; --index)
     {
         ICanvasElement layoutRebuild = this.m_LayoutRebuildQueue[index];
         if (layoutRebuild == null)
         {
             this.m_LayoutRebuildQueue.RemoveAt(index);
         }
         else if (layoutRebuild.IsDestroyed())
         {
             this.m_LayoutRebuildQueue.RemoveAt(index);
             layoutRebuild.LayoutComplete();
         }
     }
     for (int index = this.m_GraphicRebuildQueue.Count - 1; index >= 0; --index)
     {
         ICanvasElement graphicRebuild = this.m_GraphicRebuildQueue[index];
         if (graphicRebuild == null)
         {
             this.m_GraphicRebuildQueue.RemoveAt(index);
         }
         else if (graphicRebuild.IsDestroyed())
         {
             this.m_GraphicRebuildQueue.RemoveAt(index);
             graphicRebuild.GraphicUpdateComplete();
         }
     }
 }
 private void InternalUnRegisterCanvasElementForGraphicRebuild(ICanvasElement element)
 {
     if (m_PerformingGraphicUpdate)
     {
         Debug.LogError(string.Format("Trying to remove {0} from rebuild list while we are already inside a rebuild loop. This is not supported.", element));
         return;
     }
     element.GraphicUpdateComplete();
     instance.m_GraphicRebuildQueue.Remove(element);
 }
    public static int GraphicUpdateComplete(IntPtr l)
    {
        int result;

        try
        {
            ICanvasElement canvasElement = (ICanvasElement)LuaObject.checkSelf(l);
            canvasElement.GraphicUpdateComplete();
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
示例#6
0
 private void InternalUnRegisterCanvasElementForGraphicRebuild(ICanvasElement element)
 {
     if (m_PerformingGraphicUpdate)
     {
         Debug.LogError(string.Format("Trying to remove {0} from rebuild list while we are already inside a rebuild loop. This is not supported.", element));
         return;
     }
     element.GraphicUpdateComplete();
     instance.m_GraphicRebuildQueue.Remove(element);
 }