| 33 | mNumCallBacks( 0 ) {} |
| 34 | |
| 35 | Node::~Node() { |
| 36 | if ( !SceneManager::instance()->isShuttingDown() && NULL != mSceneNode ) { |
| 37 | if ( mSceneNode != this && NULL != mSceneNode->getActionManager() ) |
| 38 | mSceneNode->getActionManager()->removeAllActionsFromTarget( this ); |
| 39 | |
| 40 | if ( mNodeFlags & NODE_FLAG_SCHEDULED_UPDATE ) |
| 41 | mSceneNode->unsubscribeScheduledUpdate( this ); |
| 42 | |
| 43 | if ( isMouseOverMeOrChildren() ) |
| 44 | mSceneNode->removeMouseOverNode( this ); |
| 45 | } |
| 46 | |
| 47 | childDeleteAll(); |
| 48 | |
| 49 | if ( NULL != mParentNode ) |
| 50 | mParentNode->childRemove( this ); |
| 51 | |
| 52 | EventDispatcher* eventDispatcher = getEventDispatcher(); |
| 53 | |
| 54 | if ( NULL != eventDispatcher ) { |
| 55 | if ( eventDispatcher->getFocusNode() == this && mSceneNode != this ) { |
| 56 | eventDispatcher->setFocusNode( mSceneNode ); |
| 57 | } |
| 58 | |
| 59 | if ( eventDispatcher->getLastFocusNode() == this && mSceneNode != this ) { |
| 60 | eventDispatcher->setLastFocusNode( mSceneNode ); |
| 61 | } |
| 62 | |
| 63 | if ( eventDispatcher->getMouseOverNode() == this && mSceneNode != this ) { |
| 64 | eventDispatcher->setMouseOverNode( mSceneNode ); |
| 65 | } |
| 66 | |
| 67 | if ( eventDispatcher->getMouseDownNode() == this ) { |
| 68 | eventDispatcher->resetMouseDownNode(); |
| 69 | } |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | void Node::worldToNodeTranslation( Vector2f& Pos ) const { |
| 74 | Node* ParentLoop = mParentNode; |
nothing calls this directly
no test coverage detected