using System; using Gwen.Control; namespace Gwen.ControlInternal { /// /// Scrollbar button. /// public class ScrollBarButton : Button { private Pos m_Direction; /// /// Initializes a new instance of the class. /// /// Parent control. public ScrollBarButton(Base parent) : base(parent) { SetDirectionUp(); } public virtual void SetDirectionUp() { m_Direction = Pos.Top; } public virtual void SetDirectionDown() { m_Direction = Pos.Bottom; } public virtual void SetDirectionLeft() { m_Direction = Pos.Left; } public virtual void SetDirectionRight() { m_Direction = Pos.Right; } /// /// Renders the control using specified skin. /// /// Skin to use. protected override void Render(Skin.Base skin) { skin.DrawScrollButton(this, m_Direction, IsDepressed, IsHovered, IsDisabled); } } }