FSO.Client.UI.Controls.UIButton.GetBounds C# (CSharp) Метод

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

public GetBounds ( ) : Rectangle
Результат Microsoft.Xna.Framework.Rectangle
        public override Rectangle GetBounds()
        {
            /*
            if (m_Bounds == Rectangle.Empty)
            {
                if (Width != 0)
                {
                    m_Bounds = new Rectangle(0, 0, (int)Width, m_Texture.Height);
                }
                else
                {
                    m_Bounds = new Rectangle(0, 0, m_WidthDiv3, m_Texture.Height);
                }
            }
            return m_Bounds;
            */
            return new Rectangle(0, 0, ClickHandler.Region.Width, ClickHandler.Region.Height); //ClickHandler.Region seems to be infinitely more trustworthy for this.
        }

Usage Example

Пример #1
0
 public override Rectangle GetBounds()
 {
     return(_Button.GetBounds());
 }