MCPcopy Create free account
hub / github.com/TankOs/SFGUI / Update

Method Update

src/SFGUI/Widget.cpp:196–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196void 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
220void Widget::Invalidate() const {
221 if( !m_invalidated ) {

Callers 15

HandleUpdateMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
RunMethod · 0.45

Calls 7

emptyMethod · 0.80
GetCustomDrawCallbackMethod · 0.80
SetPositionMethod · 0.45
SetLevelMethod · 0.45
SetZOrderMethod · 0.45
ShowMethod · 0.45
SetViewportMethod · 0.45

Tested by 1

RunMethod · 0.36