Create a scheme from a .scheme file

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Neckara
Just popping in
Just popping in
Posts: 11
Joined: Sun May 12, 2013 07:44

Create a scheme from a .scheme file

Postby Neckara » Sun May 12, 2013 07:54

Hello,

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 ;)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Create a scheme from a .scheme file

Postby CrazyEddie » Mon May 13, 2013 08:14

CEGUI uses a resource provider system to load its resources. Please read the tutorial: http://www.cegui.org.uk/api_reference/r ... orial.html

Also, we recommend CEED over CELayoutEditor these days (unless someone is using some unsupported CEGUI version - like 0.5.x or 0.6.x).

CE.

Neckara
Just popping in
Just popping in
Posts: 11
Joined: Sun May 12, 2013 07:44

Re: Create a scheme from a .scheme file

Postby Neckara » Mon May 13, 2013 20:46

Thanks a lot, it works^^

I try Ceed, but the "Synchronising embedded CEGUI with the projet" seems be very long...
I'll see tomarrow if it will be finished.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 36 guests