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
Gered 10e057953e initial commit
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.
2013-03-28 18:47:01 -04:00

39 lines
1 KiB
C#

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);
}
}
}