Garthy
20-01-2011 01:26:44
Hi!
I've made a patch to the Ogre platform in MyGUI 3.0.1 to enable MyGUI to search all resource groups rather than just the one provided (default is "General" I believe).
Patch included.
(gzipped, as the forum won't let me attach a file ending in "patch")
The new behaviour is disabled by default. With this patch, you can optionally do this:
And then, whenever MyGUI goes looking for a resource, it'll search all resource groups, not just the one provided.
This is to solve a problem I had where I had resources in multiple resource groups, and I wanted MyGUI to be able to load from all of them. (More info: http://www.ogre3d.org/forums/viewtopic.php?f=1&t=62625 )
Now, I've gone for a simple approach rather than anything complex, it can certainly be improved, but I figured I'd go for something basic to start with.
Now I've tested it against my slightly-tweaked build of MyGUI, and it works fine; I *think* it'll work fine with the stock 3.0.1, but be sure to test it if you use it.
To the main MyGUI devs, are you happy with the method name and implementation? Would you be interested in applying the patch to the official distribution?
As a bit of a side note, is there any sort of MyGUI pre-release announcement list I can sign up to? I'd be very keen to try out the next version of MyGUI shortly before official release, particularly to test this patch or a similar one in the official code.
EDIT: I just noticed the 3.2.0 RC1 announcement. Nice timing. 
I hope this is useful.
I've made a patch to the Ogre platform in MyGUI 3.0.1 to enable MyGUI to search all resource groups rather than just the one provided (default is "General" I believe).
Patch included.

The new behaviour is disabled by default. With this patch, you can optionally do this:
platform = MyGUI::OgrePlatform();
platform->initialise(window, scenemgr);
platform->enableAllResourceGroups(); // <--- This bit is new! :)
And then, whenever MyGUI goes looking for a resource, it'll search all resource groups, not just the one provided.
This is to solve a problem I had where I had resources in multiple resource groups, and I wanted MyGUI to be able to load from all of them. (More info: http://www.ogre3d.org/forums/viewtopic.php?f=1&t=62625 )
Now, I've gone for a simple approach rather than anything complex, it can certainly be improved, but I figured I'd go for something basic to start with.
Now I've tested it against my slightly-tweaked build of MyGUI, and it works fine; I *think* it'll work fine with the stock 3.0.1, but be sure to test it if you use it.

To the main MyGUI devs, are you happy with the method name and implementation? Would you be interested in applying the patch to the official distribution?
As a bit of a side note, is there any sort of MyGUI pre-release announcement list I can sign up to? I'd be very keen to try out the next version of MyGUI shortly before official release, particularly to test this patch or a similar one in the official code.


I hope this is useful.
