problems loading windows look
Posted: Fri Jan 19, 2007 22:58
I've created a pure windows look .layout file, however when i load it with
LOGIN_ROOT = WindowManager::getSingleton().loadWindowLayout("main.layout");
the logfile says that:
[source]
19/01/2007 17:14:43 (InfL1) Creating falagard mapping for type 'WindowsLook/ListboxItem' using base type 'CEGUI/ItemEntry', window renderer 'Falagard/ItemEntry' and Look'N'Feel 'WindowsLook/ListboxItem'.
19/01/2007 17:14:43 (Error) Exception: WindowFactoryManager::getFactory - A WindowFactory object, an alias, or mapping for 'WindowsLook/SystemButton' Window objects is not registered with the system.
19/01/2007 17:14:43 (Error) Exception: GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for 'WindowsLook/FrameWindow' objects.
19/01/2007 17:14:43 (Error) WindowManager::loadWindowLayout - loading of layout from file 'main.layout' failed.
[/source]
Here is my setup code:
[source]
rp->setResourceGroupDirectory("schemes", "./datafiles/schemes/");
rp->setResourceGroupDirectory("imagesets", "./datafiles/imagesets/");
rp->setResourceGroupDirectory("fonts", "./datafiles/fonts/");
rp->setResourceGroupDirectory("layouts", "./datafiles/layouts/");
rp->setResourceGroupDirectory("looknfeels", "./datafiles/looknfeel/");
rp->setResourceGroupDirectory("lua_scripts", "./datafiles/lua_scripts/");
// set the default resource groups to be used
Imageset::setDefaultResourceGroup("imagesets");
Font::setDefaultResourceGroup("fonts");
Scheme::setDefaultResourceGroup("schemes");
WidgetLookManager::setDefaultResourceGroup("looknfeels");
WindowManager::setDefaultResourceGroup("layouts");
ScriptModule::setDefaultResourceGroup("lua_scripts");
Imageset* WindowsImages = ImagesetManager::getSingleton().createImageset("WindowsLook.imageset");
System::getSingleton().setDefaultMouseCursor(&WindowsImages->getImage("MouseArrow"));
FontManager::getSingleton().createFont("DejaVuSans-10.font");
FontManager::getSingleton().createFont("Commonwealth-10.font");
WidgetLookManager::getSingleton().parseLookNFeelSpecification("WindowsLook.looknfeel");
SchemeManager::getSingleton().loadScheme("WindowsLookWidgets.scheme");
LOGIN_ROOT = WindowManager::getSingleton().loadWindowLayout("main.layout");
System::getSingleton().setGUISheet(LOGIN_ROOT);
[/source]
This is actually just Tahrez loading code from the tutorial converted to point to windows look files instead.
Thanks for reading.
LOGIN_ROOT = WindowManager::getSingleton().loadWindowLayout("main.layout");
the logfile says that:
[source]
19/01/2007 17:14:43 (InfL1) Creating falagard mapping for type 'WindowsLook/ListboxItem' using base type 'CEGUI/ItemEntry', window renderer 'Falagard/ItemEntry' and Look'N'Feel 'WindowsLook/ListboxItem'.
19/01/2007 17:14:43 (Error) Exception: WindowFactoryManager::getFactory - A WindowFactory object, an alias, or mapping for 'WindowsLook/SystemButton' Window objects is not registered with the system.
19/01/2007 17:14:43 (Error) Exception: GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for 'WindowsLook/FrameWindow' objects.
19/01/2007 17:14:43 (Error) WindowManager::loadWindowLayout - loading of layout from file 'main.layout' failed.
[/source]
Here is my setup code:
[source]
rp->setResourceGroupDirectory("schemes", "./datafiles/schemes/");
rp->setResourceGroupDirectory("imagesets", "./datafiles/imagesets/");
rp->setResourceGroupDirectory("fonts", "./datafiles/fonts/");
rp->setResourceGroupDirectory("layouts", "./datafiles/layouts/");
rp->setResourceGroupDirectory("looknfeels", "./datafiles/looknfeel/");
rp->setResourceGroupDirectory("lua_scripts", "./datafiles/lua_scripts/");
// set the default resource groups to be used
Imageset::setDefaultResourceGroup("imagesets");
Font::setDefaultResourceGroup("fonts");
Scheme::setDefaultResourceGroup("schemes");
WidgetLookManager::setDefaultResourceGroup("looknfeels");
WindowManager::setDefaultResourceGroup("layouts");
ScriptModule::setDefaultResourceGroup("lua_scripts");
Imageset* WindowsImages = ImagesetManager::getSingleton().createImageset("WindowsLook.imageset");
System::getSingleton().setDefaultMouseCursor(&WindowsImages->getImage("MouseArrow"));
FontManager::getSingleton().createFont("DejaVuSans-10.font");
FontManager::getSingleton().createFont("Commonwealth-10.font");
WidgetLookManager::getSingleton().parseLookNFeelSpecification("WindowsLook.looknfeel");
SchemeManager::getSingleton().loadScheme("WindowsLookWidgets.scheme");
LOGIN_ROOT = WindowManager::getSingleton().loadWindowLayout("main.layout");
System::getSingleton().setGUISheet(LOGIN_ROOT);
[/source]
This is actually just Tahrez loading code from the tutorial converted to point to windows look files instead.
Thanks for reading.