I'm french so my English isn't really good, so excuse me if I make some mistakes.
I try to use CEGUI with Irrlicht but the example I found are a little old...
I make this following code :
Code: Select all
try{
CEGUI::IrrlichtRenderer & myRenderer = CEGUI::IrrlichtRenderer::bootstrapSystem(*device);
// new CEGUI::System(myRenderer);
}catch(CEGUI::Exception &e){
std::cerr << e.getMessage() << std::endl;
}catch(...){
std::cerr << "unknown exception" << std::endl;
}
try{
CEGUI::SchemeManager::getSingleton().create("/home/neckara/Bureau/CELayoutEditor-0.7.1/datafiles/schemes/VanillaSkin.scheme");
//CEGUI::SchemeManager::getSingleton().loadScheme("./data/gui/schemes/TaharezLook.scheme");
}catch(CEGUI::Exception &e){
std::cout << e.getMessage() << std::endl;
}
//CEGUI::FontManager::getSingleton().createFont("./data/gui/fonts/Commonwealth-10.font");
//CEGUI::System::getSingleton().setDefaultMouseCursor("TaharezLook", "MouseArrow");
CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton ();
winMgr.destroyAllWindows();
CEGUI::Window * test = winMgr.loadWindowLayout ("/home/neckara/Bureau/unnamed1.layout", "root/");
//background->addChildWindow (winMgr.loadWindowLayout ("/home/neckara/Bureau/unnamed1.layout", "root/"));
/* CEGUI::WindowManager::getSingleton().getWindow("root/b_quit")->
subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&gui_system::close, this));*/
CEGUI::System::getSingleton ().setGUISheet( test/*background*/ );
But when I try to create a scheme from a .scheme file, the programm quit and I have this error message :
CEGUI::InvalidRequestException in file CEGUIIrrlichtResourceProvider.cpp(67) : IrrlichtResourceProvider::loadRawDataContainer: Filename supplied for loading must be valid [Vanilla.imageset]
IrrlichtResourceProvider::loadRawDataContainer: Filename supplied for loading must be valid [Vanilla.imageset]
CEGUI::UnknownObjectException in file CEGUIWindowFactoryManager.cpp(180) : WindowFactoryManager::getFactory - A WindowFactory object, an alias, or mapping for 'Vanilla/Button' Window objects is not registered with the system.
CEGUI::InvalidRequestException in file CEGUIGUILayout_xmlHandler.cpp(233) : GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for 'Vanilla/Button' objects.
terminate called after throwing an instance of 'CEGUI::InvalidRequestException'
what(): CEGUI::InvalidRequestException in file CEGUIGUILayout_xmlHandler.cpp(233) : GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for 'Vanilla/Button' objects.
But the .scheme file I use is a CELayoutEditor-0.7.1's file ( as I'm here, there is 2 files missing in your CELayoutEditor-0.7.1's archive : DejaVuSans-10.font and DejaVuSans.ttf, CELayoutEditor can't work without this two ) and CELayoutEditor-0.7.1 work well.
So I'm think I must add the datafiles directory to a "search path" for CEGUI but I didn't find a such function/method.
Thank for reading me
