Resource loading problem
Posted: Fri Feb 18, 2005 00:09
Hi, I got latest this morning and the resource loading stuff (while looking very cool) did break my build. The problem for me is that I load up schemes, imagesets, etc in subdirectories. For example, I load the scheme with this:
The GUIScheme.xsd sits in the same directory. This used to work fine, but now it fails to find the xsd, probably because its looking in the root directory. In my build, I got around this by adding the following code to the scheme, imageset, and font loading:
and then use that to load the file:
I'm not sure how it is supposed to work, but these couple of lines fixed it for me. I didn't make up a patch 'cause I'm feeling lazy today.
btw, even when I click no smileys, it still puts in smileys in the final post!
Edit: ok, [code] does work! :D
Code: Select all
CEGUI::SchemeManager::getSingleton().loadScheme("gui/schemes/TaharezLook.scheme" );
The GUIScheme.xsd sits in the same directory. This used to work fine, but now it fails to find the xsd, probably because its looking in the root directory. In my build, I got around this by adding the following code to the scheme, imageset, and font loading:
Code: Select all
String sSchemaFileName;
size_t pos = filename.rfind("/" );
if (pos == String::npos) pos = filename.rfind("\\" );
if (pos != String::npos) sSchemaFileName.assign(filename, 0, pos+1);
sSchemaFileName += GUISchemeSchemaName;
and then use that to load the file:
Code: Select all
loadRawDataContainer(sSchemaFileName, ...)
I'm not sure how it is supposed to work, but these couple of lines fixed it for me. I didn't make up a patch 'cause I'm feeling lazy today.
btw, even when I click no smileys, it still puts in smileys in the final post!
Edit: ok, [code] does work! :D