| 38 | } |
| 39 | |
| 40 | bool 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 | |
| 62 | void GuiOffscreenCanvas::onRemove() |
| 63 | { |
nothing calls this directly
no test coverage detected