This repository has been archived on 2023-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
gwen-dotnet/Gwen/ControlInternal/SliderBar.cs

39 lines
1 KiB
C#
Raw Normal View History

using System;
using Gwen.Control;
namespace Gwen.ControlInternal
{
/// <summary>
/// Slider bar.
/// </summary>
public class SliderBar : Dragger
{
private bool m_bHorizontal;
/// <summary>
/// Indicates whether the bar is horizontal.
/// </summary>
public bool IsHorizontal { get { return m_bHorizontal; } set { m_bHorizontal = value; } }
/// <summary>
/// Initializes a new instance of the <see cref="SliderBar"/> class.
/// </summary>
/// <param name="parent">Parent control.</param>
public SliderBar(Base parent)
: base(parent)
{
Target = this;
RestrictToParent = true;
}
/// <summary>
/// Renders the control using specified skin.
/// </summary>
/// <param name="skin">Skin to use.</param>
protected override void Render(Skin.Base skin)
{
skin.DrawSliderButton(this, IsHeld, IsHorizontal);
}
}
}