[Solved]Loading from subdirectories

mprestia

13-10-2009 15:18:05

I'm having problems loading layouts from subdirectories.

Right now, I have all of my layouts and images in one flat directory and everything works fine. My directory structure looks like this:

MyGUI > [layouts/images]

However, when I add a subdirectory like this, the layouts fail to load:

MyGUI > HUD > [layouts/images]

I am using Ogre::ResourceGroupManager::addResourceLocation(...) to add the MyGUIAssets directory and specifying the location as recursive:


Ogre::ResourceGroupManager::getSingleton().addResourceLocation("../../Assets/MyGUI", "Auto", "MyGUI", true);

and using MyGUI::LayoutManager to load the layout.


MyGUI::LayoutManager::getInstance().loadLayout("HUD/HUD.layout, "HUD", 0, "MyGUI");

Is there a known issue with loading files from subdirectories?

Thanks,
Mike

my.name

13-10-2009 20:52:51

ogre is not support subdirectories

mprestia

23-06-2011 18:52:46

I was able to figure this out. I just had to add the separate layout and images folder to the resource group in resources.cfg:


[MyGUI]
Auto=../../Assets/MyGUI
FileSystem=../../Assets/MyGUI/Layouts
FileSystem=../../Assets/MyGUI/Images