本文整理汇总了C++中CCRGBAProtocol::setCascadeColorEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ CCRGBAProtocol::setCascadeColorEnabled方法的具体用法?C++ CCRGBAProtocol::setCascadeColorEnabled怎么用?C++ CCRGBAProtocol::setCascadeColorEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCRGBAProtocol
的用法示例。
在下文中一共展示了CCRGBAProtocol::setCascadeColorEnabled方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setCascadeColorEnabled
void UIWidget::setCascadeColorEnabled(bool cascadeColorEnabled)
{
CCRGBAProtocol* rgbap = DYNAMIC_CAST_CCRGBAPROTOCOL;
if (rgbap)
{
rgbap->setCascadeColorEnabled(cascadeColorEnabled);
}
}
示例2: init
bool UIWidget::init()
{
m_children = CCArray::create();
m_children->retain();
initNodes();
m_pRender->retain();
m_pRender->setZOrder(m_nWidgetZOrder);
CCRGBAProtocol* renderRGBA = DYNAMIC_CAST_CCRGBAPROTOCOL;
if (renderRGBA)
{
renderRGBA->setCascadeColorEnabled(true);
renderRGBA->setCascadeOpacityEnabled(true);
}
return true;
}
示例3: setEnableRecursiveCascading
static void setEnableRecursiveCascading(CCNode* node, bool enable)
{
CCRGBAProtocol* rgba = dynamic_cast<CCRGBAProtocol*>(node);
if (rgba)
{
rgba->setCascadeColorEnabled(enable);
rgba->setCascadeOpacityEnabled(enable);
}
CCObject* obj;
CCArray* children = node->getChildren();
CCARRAY_FOREACH(children, obj)
{
CCNode* child = (CCNode*)obj;
setEnableRecursiveCascading(child, enable);
}
示例4: init
bool UIWidget::init()
{
m_children = CCArray::create();
m_children->retain();
initRenderer();
m_pRenderer->retain();
m_pRenderer->setZOrder(m_nWidgetZOrder);
CCRGBAProtocol* renderRGBA = DYNAMIC_CAST_CCRGBAPROTOCOL;
if (renderRGBA)
{
renderRGBA->setCascadeColorEnabled(true);
renderRGBA->setCascadeOpacityEnabled(true);
}
setBright(true);
ignoreContentAdaptWithSize(true);
return true;
}
示例5: init
bool UIWidget::init()
{
m_children = CCArray::create();
m_children->retain();
m_pLayoutParameterDictionary = CCDictionary::create();
CC_SAFE_RETAIN(m_pLayoutParameterDictionary);
initRenderer();
m_pRenderer->retain();
m_pRenderer->setZOrder(m_nWidgetZOrder);
CCRGBAProtocol* renderRGBA = DYNAMIC_CAST_CCRGBAPROTOCOL;
if (renderRGBA)
{
renderRGBA->setCascadeColorEnabled(true);
renderRGBA->setCascadeOpacityEnabled(true);
}
setBright(true);
ignoreContentAdaptWithSize(true);
m_pScheduler = CCDirector::sharedDirector()->getScheduler();
CC_SAFE_RETAIN(m_pScheduler);
return true;
}
示例6: init
bool Layout::init()
{
m_children = CCArray::create();
m_children->retain();
initRenderer();
m_pRenderer->retain();
m_pRenderer->setZOrder(m_nWidgetZOrder);
CCRGBAProtocol* renderRGBA = dynamic_cast<CCRGBAProtocol*>(m_pRenderer);
if (renderRGBA)
{
renderRGBA->setCascadeColorEnabled(false);
renderRGBA->setCascadeOpacityEnabled(false);
}
ignoreContentAdaptWithSize(false);
setSize(CCSizeZero);
setBright(true);
setAnchorPoint(ccp(0, 0));
m_pScheduler = CCDirector::sharedDirector()->getScheduler();
CC_SAFE_RETAIN(m_pScheduler);
return true;
}