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

Method onAdd

Engine/source/gui/core/guiOffscreenCanvas.cpp:39–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

registerWithNameMethod · 0.80
findObjectFunction · 0.50
push_backMethod · 0.45

Tested by

no test coverage detected