Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/gui/CProgressBar.h
Show All 13 Lines | |||||
* You should have received a copy of the GNU General Public License | * You should have received a copy of the GNU General Public License | ||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
#ifndef INCLUDED_CPROGRESSBAR | #ifndef INCLUDED_CPROGRESSBAR | ||||
#define INCLUDED_CPROGRESSBAR | #define INCLUDED_CPROGRESSBAR | ||||
#include "gui/IGUIObject.h" | #include "gui/IGUIObject.h" | ||||
#include "gui/CGUISprite.h" | |||||
/** | /** | ||||
* Object used to draw a value (e.g. progress) from 0 to 100 visually. | * Object used to draw a value (e.g. progress) from 0 to 100 visually. | ||||
*/ | */ | ||||
class CProgressBar : public IGUIObject | class CProgressBar : public IGUIObject | ||||
{ | { | ||||
GUI_OBJECT(CProgressBar) | GUI_OBJECT(CProgressBar) | ||||
public: | public: | ||||
CProgressBar(CGUI& pGUI); | CProgressBar(CGUI& pGUI); | ||||
virtual ~CProgressBar(); | virtual ~CProgressBar(); | ||||
protected: | protected: | ||||
/** | /** | ||||
* Draws the progress bar | * Draws the progress bar | ||||
*/ | */ | ||||
virtual void Draw(); | virtual void Draw(); | ||||
// If caption is set, make sure it's within the interval 0-100 | // If caption is set, make sure it's within the interval 0-100 | ||||
/** | /** | ||||
* @see IGUIObject#HandleMessage() | * @see IGUIObject#HandleMessage() | ||||
*/ | */ | ||||
void HandleMessage(SGUIMessage& Message); | void HandleMessage(SGUIMessage& Message); | ||||
// Settings | |||||
CGUISpriteInstance m_SpriteBackground; | |||||
CGUISpriteInstance m_SpriteBar; | |||||
float m_Caption; | |||||
}; | }; | ||||
#endif // INCLUDED_CPROGRESSBAR | #endif // INCLUDED_CPROGRESSBAR |
Wildfire Games · Phabricator