void UIWidget::setCascadeOpacityEnabled(bool cascadeOpacityEnabled) { RGBAProtocol* rgbap = DYNAMIC_CAST_RGBAProtocol; if (rgbap) { rgbap->setCascadeOpacityEnabled(cascadeOpacityEnabled); } }
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; }