closed #2403: Reverting commit 239323c to fix the bug that Tint and Fade action can't work for ProgressTimer.

This commit is contained in:
James Chen 2013-07-15 16:06:59 +08:00
parent c937824051
commit b6f78b257f
2 changed files with 20 additions and 6 deletions

View File

@ -149,14 +149,26 @@ void ProgressTimer::setReverseProgress(bool reverse)
} }
} }
void ProgressTimer::setOpacityModifyRGB(bool bValue) void ProgressTimer::setColor(const Color3B& color)
{ {
CC_UNUSED_PARAM(bValue); _sprite->setColor(color);
updateColor();
} }
bool ProgressTimer::isOpacityModifyRGB(void) const const Color3B& ProgressTimer::getColor() const
{ {
return false; return _sprite->getColor();
}
void ProgressTimer::setOpacity(GLubyte opacity)
{
_sprite->setOpacity(opacity);
updateColor();
}
GLubyte ProgressTimer::getOpacity() const
{
return _sprite->getOpacity();
} }
// Interval // Interval

View File

@ -82,8 +82,10 @@ public:
virtual void draw(void); virtual void draw(void);
void setAnchorPoint(const Point& anchorPoint); void setAnchorPoint(const Point& anchorPoint);
virtual void setOpacityModifyRGB(bool bValue); virtual void setColor(const Color3B& color);
virtual bool isOpacityModifyRGB(void) const; virtual const Color3B& getColor() const;
virtual GLubyte getOpacity() const;
virtual void setOpacity(GLubyte opacity);
inline bool isReverseDirection() { return _reverseDirection; }; inline bool isReverseDirection() { return _reverseDirection; };
inline void setReverseDirection(bool value) { _reverseDirection = value; }; inline void setReverseDirection(bool value) { _reverseDirection = value; };