| 194 | } |
| 195 | |
| 196 | void Widget::Update( float seconds ) { |
| 197 | if( m_invalidated ) { |
| 198 | m_invalidated = false; |
| 199 | m_parent_notified = false; |
| 200 | |
| 201 | m_drawable = InvalidateImpl(); |
| 202 | |
| 203 | if( m_drawable ) { |
| 204 | m_drawable->SetPosition( GetAbsolutePosition() ); |
| 205 | m_drawable->SetLevel( m_hierarchy_level ); |
| 206 | m_drawable->SetZOrder( m_z_order ); |
| 207 | m_drawable->Show( IsGloballyVisible() ); |
| 208 | |
| 209 | // We don't want to propagate container viewports for Canvases, |
| 210 | // they have their own special viewport for drawing. |
| 211 | if( m_drawable->GetPrimitives().empty() || !m_drawable->GetPrimitives()[0]->GetCustomDrawCallback() ) { |
| 212 | m_drawable->SetViewport( m_viewport ); |
| 213 | } |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | HandleUpdate( seconds ); |
| 218 | } |
| 219 | |
| 220 | void Widget::Invalidate() const { |
| 221 | if( !m_invalidated ) { |