MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / awaken

Method awaken

Engine/source/gui/core/guiControl.cpp:357–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355//-----------------------------------------------------------------------------
356
357void GuiControl::awaken()
358{
359 PROFILE_SCOPE( GuiControl_awaken );
360
361 #ifdef DEBUG_SPEW
362 Platform::outputDebugString( "[GuiControl] Waking up %i:%s (%s:%s) awake=%s",
363 getId(), getClassName(), getName(), getInternalName(),
364 mAwake ? "true" : "false" );
365 #endif
366
367 if( mAwake )
368 return;
369
370 // Wake up visible children.
371
372 for( GuiControl::iterator iter = begin(); iter != end(); ++ iter )
373 {
374 GuiControl* ctrl = static_cast< GuiControl* >( *iter );
375
376 if( ctrl->isVisible() && !ctrl->isAwake() )
377 ctrl->awaken();
378 }
379
380 if( !mAwake && !onWake() )
381 {
382 Con::errorf( ConsoleLogEntry::General, "GuiControl::awaken: failed onWake for obj: %i:%s (%s)",
383 getId(), getClassName(), getName() );
384 mAwake = false;
385 }
386}
387
388//-----------------------------------------------------------------------------
389

Callers 2

addObjectMethod · 0.80
onWakeMethod · 0.80

Calls 5

beginFunction · 0.85
endFunction · 0.85
getNameFunction · 0.50
errorfFunction · 0.50
isVisibleMethod · 0.45

Tested by

no test coverage detected