I just attempt my first test application with CEGUI but I have some trouble with my code.
As far as I understand this should work:
Code: Select all
DefaultResourceProvider* rp = static_cast<DefaultResourceProvider*>(System::getSingleton().getResourceProvider());
rp->setResourceGroupDirectory("schemes", "resource/gui/schemes/");
rp->setResourceGroupDirectory("imagesets", "resource/gui/imagesets/");
rp->setResourceGroupDirectory("fonts", "resource/gui/fonts/");
rp->setResourceGroupDirectory("layouts", "resource/gui/layouts/");
rp->setResourceGroupDirectory("looknfeels", "resource/gui/looknfeel/");
Scheme::setDefaultResourceGroup("schemes");
Imageset::setDefaultResourceGroup("imagesets");
Font::setDefaultResourceGroup("fonts");
WidgetLookManager::setDefaultResourceGroup("layouts");
WindowManager::setDefaultResourceGroup("looknfeels");
Window* myRoot = WindowManager::getSingleton().loadWindowLayout("test.layout");
System::getSingleton().setGUISheet(myRoot);
this compiled successfully, but when I executed the binary I got an exception:
Code: Select all
09/04/2009 21:33:57 (InfL1) CEGUI::System singleton created.
09/04/2009 21:33:57 (InfL1) ---- CEGUI System initialisation completed ----
09/04/2009 21:33:57 (InfL1) ---- Version 0.5.0 ----
09/04/2009 21:33:57 (InfL1) ---- Renderer module is: CEGUI::OpenGLRenderer - Official OpenGL based renderer module for CEGUI ----
09/04/2009 21:33:57 (InfL1) ---- XML Parser module is: CEGUI::XercesParser - Official Xerces-C++ based parser module for CEGUI ----
09/04/2009 21:33:57 (InfL1) ---- Scripting module is: None ----
09/04/2009 21:33:57 (InfL1) XercesParser::initialiseSchema - Attempting to load schema from file 'GUILayout.xsd'.
09/04/2009 21:33:57 (InfL1) XercesParser::initialiseSchema - XML schema file 'GUILayout.xsd' has been initialised.
09/04/2009 21:33:57 (Error) Exception: DefaultResourceProvider::load - test.layout does not exist
09/04/2009 21:33:57 (Error) XercesParser::parseXMLFile - An unexpected error occurred while parsing XML file 'test.layout'.
09/04/2009 21:33:57 (Error) WindowManager::loadWindowLayout - loading of layout from file 'test.layout' failed.
I copied the file to every possible location but it's still not found.
Whats the problem here?
btw. I'm working with Debian (=> old packages), therefore my CEGUI is outdated.

