1 /* 2 GWEN 3 Copyright (c) 2010 Facepunch Studios 4 See license in Gwen.h 5 */ 6 7 #include "Gwen/Controls/ScrollBar.h" 8 #include "Gwen/Controls/ScrollBarButton.h" 9 10 using namespace Gwen; 11 using namespace Gwen::Controls; 12 using namespace Gwen::ControlsInternal; 13 GWEN_CONTROL_CONSTRUCTOR(ScrollBarButton)14GWEN_CONTROL_CONSTRUCTOR(ScrollBarButton) 15 { 16 m_iDirection = 0; 17 SetBounds(0, 0, 0, 0); 18 } 19 SetDirectionUp()20void ScrollBarButton::SetDirectionUp() 21 { 22 m_iDirection = Pos::Top; 23 } 24 SetDirectionDown()25void ScrollBarButton::SetDirectionDown() 26 { 27 m_iDirection = Pos::Bottom; 28 } 29 SetDirectionLeft()30void ScrollBarButton::SetDirectionLeft() 31 { 32 m_iDirection = Pos::Left; 33 } 34 SetDirectionRight()35void ScrollBarButton::SetDirectionRight() 36 { 37 m_iDirection = Pos::Right; 38 } 39 Render(Skin::Base * skin)40void ScrollBarButton::Render(Skin::Base* skin) 41 { 42 skin->DrawScrollButton(this, m_iDirection, m_bDepressed); 43 }