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