team23
16-09-2007 01:24:50
I'm attempting to use the CEGUI .setUserData function but it seems that it handles only void *.
I noticed in the newt binding the setUserData function uses an object * so you can toss it any python object, can CEGUI be given the same function?
I can certainly make this work -- could you send me a small sample program that uses the 'userdata' so i can test this..
Thanks
Andy
This is implemented and in the SVN (will be in next binary)..
Much like the OgreNewt implementation i expect you to ensure the that 'user object' is static (ie when you do a setUserData I don't increment the object count, so if it goes out of scope it will delete)..
Just a case of keeping an array around and appending the user data to this array..
Demo_CEGUI_DragnDrop has the test code..
Cheers
Andy
team23
20-09-2007 05:59:28
Great, thanks Andy! Thats exactly what I want it to do.