Fixing CCScale9Sprites when loaded from CCB files to be able to change color and opacity

This commit is contained in:
Michael Fox 2013-05-07 12:02:32 -07:00
parent 70472d558d
commit f51506eed2
2 changed files with 12 additions and 0 deletions

View File

@ -805,6 +805,11 @@ void CCScale9Sprite::setColor(const ccColor3B& color)
}
}
const ccColor3B& CCScale9Sprite::getColor()
{
return _color;
}
void CCScale9Sprite::setOpacity(GLubyte opacity)
{
_opacity = opacity;
@ -821,4 +826,9 @@ void CCScale9Sprite::setOpacity(GLubyte opacity)
}
}
GLubyte CCScale9Sprite::getOpacity()
{
return _opacity;
}
NS_CC_EXT_END

View File

@ -308,7 +308,9 @@ public:
*/
virtual bool isOpacityModifyRGB(void);
virtual void setOpacity(GLubyte opacity);
virtual GLubyte CCScale9Sprite::getOpacity();
virtual void setColor(const ccColor3B& color);
virtual const ccColor3B& CCScale9Sprite::getColor();
virtual bool updateWithBatchNode(CCSpriteBatchNode* batchnode, CCRect rect, bool rotated, CCRect capInsets);