Gered
10e057953e
Contains changes from "gwen-dotnet" removing dependancies on Windows, which ultimately means certain features (e.g. file load/save dialogs) do not work. Those classes still exist, but the code has been commented out.
34 lines
976 B
C#
34 lines
976 B
C#
using System;
|
|
using Gwen.Control;
|
|
|
|
namespace Gwen.ControlInternal
|
|
{
|
|
/// <summary>
|
|
/// Window close button.
|
|
/// </summary>
|
|
public class CloseButton : Button
|
|
{
|
|
private readonly WindowControl m_Window;
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="CloseButton"/> class.
|
|
/// </summary>
|
|
/// <param name="parent">Parent control.</param>
|
|
/// <param name="owner">Window that owns this button.</param>
|
|
public CloseButton(Base parent, WindowControl owner)
|
|
: base(parent)
|
|
{
|
|
m_Window = owner;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Renders the control using specified skin.
|
|
/// </summary>
|
|
/// <param name="skin">Skin to use.</param>
|
|
protected override void Render(Skin.Base skin)
|
|
{
|
|
skin.DrawWindowCloseButton(this, IsDepressed && IsHovered, IsHovered && ShouldDrawHover, !m_Window.IsOnTop);
|
|
}
|
|
}
|
|
}
|