[SOLVED] Loading layout file: code compiles, no GUI showing.


14-04-2014 12:41:40

So I finally managed to get everything to work with MyGUI and ogre.
I can add new widgets via code and work with them.

I then tried to create a layout using the LayoutEditor application. But when I load it via code, it compiles but no GUI is showing.

This is the Layout file:

<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Button" skin="Button" position="464 204 100 100" layer="Main"

<Property key="Widget_Caption" value="exit" />

And this is how I load it:

/* In BaseApplication.cpp */
mPlatform = new MyGUI::OgrePlatform();
mPlatform->initialise(mWindow, mSceneMgr);
mGui = new MyGUI::Gui();

/* In my createScene method */

What am I missing? I'm failry new to Ogre, so maybe I need to setup something else? Thanks for the help :)

EDIT: Nevermind. I solved it. I was placing the .layout file in the wrong place. Placed it in the $(OGRE_HOME)/media directory and now it shows fine.