Obg1
#1
Hi All,
Found a bug with settings the menu opacity.
The following change fixed it (File: cocos2dx\menu_nodes\CCMenuItem.cpp ) :
void CCMenuItemLabel::setOpacity(GLubyte opacity)
{
CCRGBAProtocol* node = dynamic_cast<CCRGBAProtocol*>(m_pLabel);
if (node)
{
node->setOpacity(opacity);
}
}
Obg1
#3
In the original function there is no check if the cast fails and returns NULL.
http://www.cocos2d-x.org/projects/cocos2d-x/repository/revisions/master/entry/cocos2dx/menu_nodes/CCMenuItem.cpp
void CCMenuItemLabel::setOpacity(GLubyte opacity)
{
dynamic_cast(m_pLabel)->setOpacity(opacity);
}