QuickGUI::GUIManager change?

scippio

10-01-2008 17:30:58

hi...
In wiki:

QuickGUI::GUIManager* mGUIManager = new QuickGUI::GUIManager(mCamera->getViewport());

In my code:

...
Ogre::Camera *cam = SrCamera::getSingleton().mCamera;
...
mGUIManager = new QuickGUI::GUIManager(cam->getViewport());

But when I compile my code:

error: no matching function for call to 'QuickGUI::GUIManager::GUIManager(Ogre::Viewport*)'
inc/quickgui/QuickGUIManager.h:273: note: candidates are: QuickGUI::GUIManager::GUIManager(const Ogre::String&, Ogre::Viewport*)
inc/quickgui/QuickGUIManager.h:49: note: QuickGUI::GUIManager::GUIManager(const QuickGUI::GUIManager&)


I have SVN revision 311 ...

Artic_Ice83

10-01-2008 18:24:55

hi!
if you see in the demo, before create the gui manager, you must create a QuickGUI Root object (is a singleton) and than you can create the GUIManager by this code:


new QuickGUI::Root();
QuickGUI::SkinSetManager::getSingleton().loadSkin("qgui",QuickGUI::SkinSet::IMAGE_TYPE_PNG,mResourceGroup);
mGUIManager=QuickGUI::Root::getSingleton().createGUIManager(mCamera->getViewport());
mGUIManager->setSceneManager(mSceneMgr);



this is the unic change to create GUIManager

kungfoomasta

10-01-2008 18:27:35

Sorry, the wiki is a little dated, personal life has taken over my time in the past 1.5 months..

Artic_Ice83 is right. If you run into a wall the demo might help, since it always works according to latest SVN. (I use it for testing..)