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

Method onAdd

Engine/source/gui/core/guiOffscreenCanvas.cpp:40–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40bool GuiOffscreenCanvas::onAdd()
41{
42 if (GuiControl::onAdd()) // jamesu - skip GuiCanvas onAdd since it sets up GFX which is bad
43 {
44 // ensure that we have a cursor
45 setCursor(dynamic_cast<GuiCursor*>(Sim::findObject("DefaultCursor")));
46
47 mRenderFront = true;
48 sList.push_back(this);
49
50 //Con::printf("Registering target %s...", mTargetName.c_str());
51 mNamedTarget.registerWithName( mTargetName );
52
53 _setupTargets();
54
55 GFXTextureManager::addEventDelegate( this, &GuiOffscreenCanvas::_onTextureEvent );
56
57 return true;
58 }
59 return false;
60}
61
62void GuiOffscreenCanvas::onRemove()
63{

Callers

nothing calls this directly

Calls 3

registerWithNameMethod · 0.80
findObjectFunction · 0.50
push_backMethod · 0.45

Tested by

no test coverage detected