hi,
I experienced a problem on the CCFadeOut on CCControlButton. The text didn’t fade out when running the action
@
CCControlButton btn = CCControlButton::create;
addChild
CCActionIntervalaction = CCFadeOut::create(2);
btn->runAction(action);
@
Screen Shot 2013-08-26 at 1.07.18 AM.png (38.1 KB)
Hoping you already found the solution, but I just had this happen to me using 2.2. The solution is to change CControlButton.cpp:
void CCControlButton::setOpacity(GLubyte opacity)
{
// XXX fixed me if not correct
CCControl::setOpacity(opacity);
// m_cOpacity = opacity;
//
// CCObject* child;
// CCArray* children=getChildren();
// CCARRAY_FOREACH(children, child)
// {
// CCRGBAProtocol* pNode = dynamic_cast(child);
// if (pNode)
// {
// pNode->setOpacity(opacity);
// }
// }
CCDictElement * item = NULL;
CCDICT_FOREACH(m_backgroundSpriteDispatchTable, item)
{
CCScale9Sprite* sprite = (CCScale9Sprite*)item->getObject();
sprite->setOpacity(opacity);
}
// add this
if (m_titleLabel != NULL) {
CCRGBAProtocol* pNode = dynamic_cast(m_titleLabel);
if (pNode)
{
pNode->setOpacity(opacity);
}
}
}