using System;
using Gwen.Control;
namespace Gwen.ControlInternal
{
///
/// Window close button.
///
public class CloseButton : Button
{
private readonly WindowControl m_Window;
///
/// Initializes a new instance of the class.
///
/// Parent control.
/// Window that owns this button.
public CloseButton(Base parent, WindowControl owner)
: base(parent)
{
m_Window = owner;
}
///
/// Renders the control using specified skin.
///
/// Skin to use.
protected override void Render(Skin.Base skin)
{
skin.DrawWindowCloseButton(this, IsDepressed && IsHovered, IsHovered && ShouldDrawHover, !m_Window.IsOnTop);
}
}
}