ScrollBarButton.cpp 747 B

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