// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
namespace FlaxEngine.GUI
{
///
/// Border control that draws the border around the control edges (inner and outer sides).
///
public class Border : Control
{
///
/// Gets or sets the color used to draw border lines.
///
[EditorOrder(0), Tooltip("The color used to draw border lines.")]
public Color BorderColor { get; set; }
///
/// The border lines width.
///
[EditorOrder(10), Limit(0, float.MaxValue, 0.1f), Tooltip("The border lines width.")]
public float BorderWidth { get; set; }
///
/// Initializes a new instance of the class.
///
public Border()
{
var style = Style.Current;
BorderColor = style.BorderNormal;
BorderWidth = 2.0f;
}
///
public override void Draw()
{
base.Draw();
Render2D.DrawRectangle(new Rectangle(Vector2.Zero, Size), BorderColor, BorderWidth);
}
}
}