GUIManager::setSceneManager

Zini

11-09-2007 10:17:31

I have another request: Could you change GUIManager::setSceneManager to something like this:


// remove listener from previous scene manager
if(mSceneManager != NULL)
mSceneManager->removeRenderQueueListener(this);
// update
mSceneManager = sm;
// add listener to new scene manager
if (mSceneManager)
mSceneManager->addRenderQueueListener(this);


I would like to set the scene manager to a 0-pointer again, because at one point I am deleting a scene manager, which is used for the GUI, so I need to tell the GUI, that the scene manager isn't available anymore. But the new scene manager isn't available at this point either, therefore a 0-pointer is the only option.

kungfoomasta

11-09-2007 16:22:42

I can see this being useful, and it was easy enough to add in. Will be in next SVN revision. (right before I leave for work)