void UIWidget::setCascadeColorEnabled(bool cascadeColorEnabled) { RGBAProtocol* rgbap = DYNAMIC_CAST_RGBAProtocol; if (rgbap) { rgbap->setCascadeColorEnabled(cascadeColorEnabled); } }
bool UIWidget::init() { m_children = CCArray::create(); m_children->retain(); initRenderer(); m_pRenderer->retain(); m_pRenderer->setZOrder(m_nWidgetZOrder); RGBAProtocol* renderRGBA = DYNAMIC_CAST_RGBAProtocol; if (renderRGBA) { renderRGBA->setCascadeColorEnabled(true); renderRGBA->setCascadeOpacityEnabled(true); } setBright(true); ignoreContentAdaptWithSize(true); return true; }