I am working on a program...
I want to change the MouseCursor, i can change it, but i also need to change it with a value from a .txt message so the user can customise.
string fromtxtfile;
CEGUI::String valuefromtxtfile = fromtxtfile;
CEGUI::MouseCursor::getSingleton().setImage("LevelLook", valuefromtxtfile);
I have mad al the value's in the txt file available in the levellook.schem and levellook.imageset. If i use hard code like .setImage("LevelLook", "MouseEnemy"); it works fine.
Can anyone tell me what i am doing wrong..
Change mouse Image
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Hi, and welcome to the forum
It certainly looks like it should work. Can you look in the CEGUI.log file and see if there are any errors.
The only other thing that comes to mind at the moment is that it could be a character encoding issue - whether this is the case or not will depend on whether you use characters with code >127, and if so, how you subsequently assign those to the string object.
Anyhow, for now just look in the log and see if there are errors relating to images
CE.

It certainly looks like it should work. Can you look in the CEGUI.log file and see if there are any errors.
The only other thing that comes to mind at the moment is that it could be a character encoding issue - whether this is the case or not will depend on whether you use characters with code >127, and if so, how you subsequently assign those to the string object.
Anyhow, for now just look in the log and see if there are errors relating to images

CE.
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Looks like you're passing a non-ascii character or something (like CE suggested). Are you sure that your txt file loader is working correctly? You can dump the loaded settings with calls to CEGUI::Logger::getSingleton().logEvent(...).
HTH!
HTH!
Last edited by scriptkid on Sun Feb 10, 2008 11:38, edited 1 time in total.
Check out my released snake game using Cegui!
Who is online
Users browsing this forum: No registered users and 22 guests