ARCed.XnaExtensions.DrawSelectionRect C# (CSharp) Method

DrawSelectionRect() public static method

Draws a bordered selection rectangle around the given rectangle.
public static DrawSelectionRect ( this batch, Rectangle rect, Microsoft.Xna.Framework.Color color, int thickness = 1 ) : void
batch this SpriteBatch to draw the rectangle.
rect Microsoft.Xna.Framework.Rectangle Rectangle to draw
color Microsoft.Xna.Framework.Color Color of the rectangle border
thickness int Thickness, in pixels, of the inner selection rectangle
return void
        public static void DrawSelectionRect(this SpriteBatch batch, Rectangle rect, Color color, int thickness = 1)
        {
            DrawRectangle(batch, rect, Color.Black, thickness + 2);
            DrawRectangle(batch, new Rectangle(rect.X + 1, rect.Y + 1,
                rect.Width - 2, rect.Height - 2), color, thickness);
        }