ProgressBar.h 846 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. GWEN
  3. Copyright (c) 2010 Facepunch Studios
  4. See license in Gwen.h
  5. */
  6. #pragma once
  7. #ifndef GWEN_CONTROLS_PROGRESSBAR_H
  8. #define GWEN_CONTROLS_PROGRESSBAR_H
  9. #include "Gwen/Controls/Base.h"
  10. #include "Gwen/Controls/Label.h"
  11. #include "Gwen/Gwen.h"
  12. #include "Gwen/Skin.h"
  13. namespace Gwen
  14. {
  15. namespace Controls
  16. {
  17. class GWEN_EXPORT ProgressBar : public Label
  18. {
  19. public:
  20. GWEN_CONTROL( ProgressBar, Label );
  21. virtual void Render( Skin::Base* skin );
  22. virtual void SetVertical() { m_bHorizontal = false; }
  23. virtual void SetHorizontal(){ m_bHorizontal = true; }
  24. virtual void SetValue( float val );
  25. virtual float GetValue() const { return m_fProgress; }
  26. virtual void SetAutoLabel( bool b ){ m_bAutoLabel = b; }
  27. protected:
  28. float m_fProgress;
  29. bool m_bHorizontal;
  30. bool m_bAutoLabel;
  31. };
  32. }
  33. }
  34. #endif