コード例 #1
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();
         }
     }
 }
コード例 #2
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();
         }
     }
 }
コード例 #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();
         }
     }
 }
コード例 #4
0
 private void InternalUnRegisterCanvasElementForLayoutRebuild(ICanvasElement element)
 {
     if (m_PerformingLayoutUpdate)
     {
         Debug.LogError($"Trying to remove {element} from rebuild list while we are already inside a rebuild loop. This is not supported.");
         return;
     }
     element.LayoutComplete();
     instance.m_LayoutRebuildQueue.Remove(element);
 }
コード例 #5
0
        private void InternalDisableCanvasElementForLayoutRebuild(ICanvasElement element)
        {
            if (m_PerformingLayoutUpdate)
            {
                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.LayoutComplete();
            instance.m_LayoutRebuildQueue.DisableItem(element);
        }
コード例 #6
0
 private void InternalUnRegisterCanvasElementForLayoutRebuild(ICanvasElement element)
 {
     if (this.m_PerformingLayoutUpdate)
     {
         Debug.LogError(string.Format("Trying to remove {0} from rebuild list while we are already inside a rebuild loop. This is not supported.", element));
     }
     else
     {
         element.LayoutComplete();
         CanvasUpdateRegistry.instance.m_LayoutRebuildQueue.Remove(element);
     }
 }
コード例 #7
0
        //将element从layout rebuild queue中移除
        private void InternalUnRegisterCanvasElementForLayoutRebuild(ICanvasElement element)
        {
            //layout rebuild过程中不可以移除,必须执行完毕后才可以移除
            if (m_PerformingLayoutUpdate)
            {
                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.LayoutComplete();
            instance.m_LayoutRebuildQueue.Remove(element);
        }
コード例 #8
0
    public static int LayoutComplete(IntPtr l)
    {
        int result;

        try
        {
            ICanvasElement canvasElement = (ICanvasElement)LuaObject.checkSelf(l);
            canvasElement.LayoutComplete();
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
コード例 #9
0
        private void InternalUnRegisterCanvasElementForLayoutRebuild(ICanvasElement element)
        {
            if (m_PerformingLayoutUpdate)
            {
                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.LayoutComplete();
            instance.m_LayoutRebuildQueue.Remove(element);
        }