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.
39 lines
1 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|