bool UIWidget::isCascadeOpacityEnabled() { RGBAProtocol* rgbap = DYNAMIC_CAST_RGBAProtocol; if (rgbap) { return rgbap->isCascadeOpacityEnabled(); } return false; }
/** Override synthesized setOpacity to recurse items */ void LayerRGBA::setOpacity(GLubyte opacity) { m_cDisplayedOpacity = m_cRealOpacity = opacity; if( m_bCascadeOpacityEnabled ) { GLubyte parentOpacity = 255; RGBAProtocol *parent = dynamic_cast<RGBAProtocol*>(m_pParent); if (parent && parent->isCascadeOpacityEnabled()) { parentOpacity = parent->getDisplayedOpacity(); } updateDisplayedOpacity(parentOpacity); } }