XnaGUILib.XGPanel.Draw C# (CSharp) Method

Draw() public method

public Draw ( float frameTime ) : void
frameTime float
return void
        public override void Draw(float frameTime)
        {
            if (Fill)
                XnaGUIManager.spriteBatch.Draw(XnaGUIManager.whiteTex, ToScreen(Rectangle), BkgColor);

            Color bColor = ThisControlColor;

            //if (hiliteTime > 0.0f)
            //    bColor = ForeColor;

            if (DrawTopBorder)
            {
                _top = new Rectangle(Rectangle.Left, Rectangle.Top, Rectangle.Width, borderThickness);
                XnaGUIManager.spriteBatch.Draw(XnaGUIManager.whiteTex, ToScreen(_top), bColor);
            }

            left = new Rectangle(Rectangle.Left, Rectangle.Top + borderThickness, borderThickness, Rectangle.Height - (borderThickness * 2));
            right = new Rectangle(Rectangle.Right - borderThickness, Rectangle.Top + borderThickness, borderThickness, (Rectangle.Height - (borderThickness * 2)));
            bottom = new Rectangle(Rectangle.Left, Rectangle.Bottom - borderThickness, Rectangle.Width, borderThickness);

            XnaGUIManager.spriteBatch.Draw(XnaGUIManager.whiteTex, ToScreen(left), bColor);
            XnaGUIManager.spriteBatch.Draw(XnaGUIManager.whiteTex, ToScreen(right), bColor);
            XnaGUIManager.spriteBatch.Draw(XnaGUIManager.whiteTex, ToScreen(bottom), bColor);

            base.Draw(frameTime);
        }