2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
typedef enum {
|
|
|
|
/// Radial Counter-Clockwise
|
|
|
|
kCCProgressTimerTypeRadialCCW,
|
|
|
|
/// Radial ClockWise
|
|
|
|
kCCProgressTimerTypeRadialCW,
|
|
|
|
/// Horizontal Left-Right
|
|
|
|
kCCProgressTimerTypeHorizontalBarLR,
|
|
|
|
/// Horizontal Right-Left
|
|
|
|
kCCProgressTimerTypeHorizontalBarRL,
|
|
|
|
/// Vertical Bottom-top
|
|
|
|
kCCProgressTimerTypeVerticalBarBT,
|
|
|
|
/// Vertical Top-Bottom
|
|
|
|
kCCProgressTimerTypeVerticalBarTB,
|
2011-06-14 14:31:25 +08:00
|
|
|
} CCProgressTimerType;
|
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
class CCProgressTimer : public CCNode
|
2011-06-14 14:31:25 +08:00
|
|
|
{
|
2012-02-02 14:26:38 +08:00
|
|
|
CCProgressTimerType getType(void);
|
|
|
|
float getPercentage(void);
|
|
|
|
CCSprite* getSprite(void);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void setPercentage(float fPercentage);
|
|
|
|
void setSprite(CCSprite *pSprite);
|
|
|
|
void setType(CCProgressTimerType type);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
static CCProgressTimer* progressWithFile(const char *pszFileName);
|
|
|
|
static CCProgressTimer* progressWithTexture(CCTexture2D *pTexture);
|
2011-06-14 14:31:25 +08:00
|
|
|
};
|