UpdateWidgets() 개인적인 메소드

Update all of the widgets belonging to this panel.
private UpdateWidgets ( ) : void
리턴 void
예제 #1
0
    /// <summary>
    /// Main update function
    /// </summary>

    void LateUpdate()
    {
        // Only the very first panel should be doing the update logic
        if (list[0] != this)
        {
            return;
        }

        // Update all panels
        for (int i = 0; i < list.size; ++i)
        {
            UIPanel panel = list[i];
            panel.mUpdateTime = RealTime.time;
            panel.UpdateTransformMatrix();
            panel.UpdateLayers();
            panel.UpdateWidgets();
        }

        // Fill the draw calls for all of the changed materials
        if (mFullRebuild)
        {
            UIWidget.list.Sort(UIWidget.CompareFunc);
            Fill();
        }
        else
        {
            for (int i = 0; i < UIDrawCall.list.size;)
            {
                UIDrawCall dc = UIDrawCall.list[i];

                if (dc.isDirty)
                {
                    if (!Fill(dc))
                    {
                        DestroyDrawCall(dc, i);
                        continue;
                    }
                }
                ++i;
            }
        }

        // Update the clipping rects
        for (int i = 0; i < list.size; ++i)
        {
            UIPanel panel = list[i];
            panel.UpdateDrawcalls();
        }
        mFullRebuild = false;
    }
예제 #2
0
    /// <summary>
    /// Main update function
    /// </summary>

    void LateUpdate()
    {
        // Only the very first panel should be doing the update logic
        if (list[0] != this)
        {
            return;
        }

        // Update all panels
        for (int i = 0; i < list.size; ++i)
        {
            UIPanel panel = list[i];
            panel.mUpdateTime = RealTime.time;
            panel.UpdateTransformMatrix();
            panel.UpdateLayers();
            panel.UpdateWidgets();
        }

        if (mRebuild)
        {
            Fill();
        }
        else
        {
            BetterList <UIDrawCall> dcs = UIDrawCall.activeList;

            for (int i = 0; i < dcs.size;)
            {
                UIDrawCall dc = dcs.buffer[i];

                if (dc.isDirty && !Fill(dc))
                {
                    UIDrawCall.Destroy(dc);
                    continue;
                }
                ++i;
            }
        }

        // Update the clipping rects
        for (int i = 0; i < list.size; ++i)
        {
            UIPanel panel = list[i];
            panel.UpdateDrawcalls();
        }
        mRebuild = false;
    }
예제 #3
0
    /// <summary>
    /// Main update function
    /// </summary>

    void LateUpdate()
    {
        // Only the very first panel should be doing the update logic
        if (list[0] != this)
        {
            return;
        }

        // Update all panels
        for (int i = 0; i < list.size; ++i)
        {
            UIPanel panel = list[i];
            panel.mUpdateTime = RealTime.time;
            panel.UpdateTransformMatrix();
            panel.UpdateLayers();
            panel.UpdateWidgets();
        }

        if (mSort)
        {
            UIWidget.list.Sort(UIWidget.CompareFunc);
            Fill();
        }
        else if (mRebuild)
        {
            Fill();
        }
        else
        {
            for (int i = 0; i < UIDrawCall.list.size;)
            {
                UIDrawCall dc = UIDrawCall.list[i];

                if (!dc)
                {
                    UIDrawCall.list.RemoveAt(i);
                    continue;
                }
                else if (dc.isDirty)
                {
                    if (!Fill(dc))
                    {
                        UIDrawCall.list.RemoveAt(i);
                        NGUITools.DestroyImmediate(dc.gameObject);
                        continue;
                    }
                }
                ++i;
            }
        }

        // Update the clipping rects
        for (int i = 0; i < list.size; ++i)
        {
            UIPanel panel = list[i];
            panel.UpdateDrawcalls();
        }

        mRebuild = false;
        mSort    = false;
    }