I try to use CEGUI in my program when I try to load a TaharezLook.imageset a program return this exception.
What I do wrong? How to fix this?
Code: Select all
//this code load a resources
CEGUI::SchemeManager::getSingletonPtr()->createFromFile("bin/TaharezLook.scheme");
CEGUI::ImageManager::getSingletonPtr()->loadImageset("bin/TaharezLook.imageset");
CEGUI::FontManager::getSingletonPtr()->createFromFile("bin/DejaVuSans-10.font");
CEGUI::Font::setDefaultResourceGroup("fonts");
CEGUI::Scheme::setDefaultResourceGroup("schemes");
CEGUI::WidgetLookManager::setDefaultResourceGroup("looknfeel");
CEGUI::WindowManager::setDefaultResourceGroup("layouts");
CEGUI::ImageManager::setImagesetDefaultResourceGroup("imagesets");
Code: Select all
//this code creates a button
CEGUI::WindowManager &wmgr = CEGUI::WindowManager::getSingleton();
CEGUI::Window *sheet = wmgr.createWindow("DefaultWindow", "CEGUIDemo/Sheet");
CEGUI::Window *quit = wmgr.createWindow("TaharezLook/Button", "CEGUIDemo/QuitButton");
quit->setText("Quit");
quit->setSize(CEGUI::USize(CEGUI::UDim(0.15, 0), CEGUI::UDim(0.05, 0)));
sheet->addChild(quit);
CEGUI::System::getSingleton().getDefaultGUIContext().setRootWindow(sheet);
auto quitFunc = [](const CEGUI::EventArgs &)->bool {
exit(0);
};
quit->subscribeEvent(CEGUI::PushButton::EventClicked,
CEGUI::Event::Subscriber(&quitFunc));
Code: Select all
CEGUI::FileIOException in function 'void __thiscall CEGUI::DefaultResourceProvid
er::loadRawDataContainer(const class CEGUI::String &,class CEGUI::RawDataContain
er &,const class CEGUI::String &)' (C:\programming\gits\cegui-0.8.7\cegui\src\De
faultResourceProvider.cpp:66) : TaharezLook.imageset does not exist
CEGUI::UnknownObjectException in function 'class CEGUI::WindowFactory *__thiscal
l CEGUI::WindowFactoryManager::getFactory(const class CEGUI::String &) const' (C
:\programming\gits\cegui-0.8.7\cegui\src\WindowFactoryManager.cpp:186) : A Windo
wFactory object, an alias, or mapping for 'TaharezLook/Button' Window objects is
not registered with the system.
Have you forgotten to load a scheme using CEGUI::SchemeManager::createFromFile(..)?