Page 1 of 1

Making a crosshair mouse cursor

Posted: Fri Jan 04, 2013 08:28
by jadam
Hi,

I've successfully created my imageset with a crosshair shaped mouse cursor, but I can't figure out how can I make CEGUI consider the center if the image as the actual mouse cursor position.

I use CEGUI with Ogre and OIS, and I was messing around with trying to offset the mouse position, but I understood that injectMouseMove and such will not do any good to me.

Is there a way making the crosshair's center as the actucal mouse position?

Thanks,
Adam.

Re: Making a crosshair mouse cursor

Posted: Fri Jan 04, 2013 09:22
by Kulik
Look into offset attribute of each <Image> in the imageset. You can change what CEGUI will treat as the 0, 0 point of the image.

We even have images that do this, resizing cursors and such come to mind.

Re: Making a crosshair mouse cursor

Posted: Fri Jan 04, 2013 13:15
by jadam
Thanks a lot!

Got it working, though I've found out that CEED does not generate the correct XML, as it generates "yOffset = ..." and "xOffset = ..." while apparently it needs to be "XOffset = ..." and "YOffset = ..." for the CEGUI library to take it into consideration.

Anyway, thanks, that solved my problem!

Adam.