FSO.Client.UI.Framework.UIElement.Update C# (CSharp) Метод

Update() публичный Метод

Standard UIElement update method. All sub-classes should call this super method. The argument is an UpdateState object, this object contains everything you may need during update including GameTime, MouseState, KeyboardState etc. This is useful because it means we dont ask for Mouse & Keyboard state in every UIElement which would be wasteful
public Update ( UpdateState state ) : void
state FSO.Common.Rendering.Framework.Model.UpdateState
Результат void
        public virtual void Update(UpdateState state)
        {
            //Set our absolute depth value
            this.Depth = state.Depth++;

            //If our matrix is dirty, recalculate it
            if (_MtxDirty)
            {
                CalculateMatrix();
            }

            //If our blend is dirty, recalculate it
            if (_OpacityDirty)
            {
                CalculateOpacity();
            }

            if (WillDraw())
            {
                if (m_MouseRefs != null)
                {
                    //Check to see if the mouse is over any of the regions
                    //we have been asked to keep an eye on using ListenForMouse.
                    foreach (var mouseRegion in m_MouseRefs)
                    {
                        if (HitTestArea(state, mouseRegion.Region, true))
                        {
                            state.MouseEvents.Add(mouseRegion);
                        }
                    }
                }

                //Update hooks are callbacks. This lets external code add extra work
                //that executes during the update loop.
                //This is important because things like drag & drop should be calculated in the update loop.
                //See UIUtils.MakeDraggable
                if (UpdateHooks != null)
                {
                    lock (UpdateHooks)
                    {
                        foreach (var hook in UpdateHooks)
                        {
                            hook(state);
                        }
                    }
                }
            }
        }