Mouse click coordinates
Posted: Mon Jun 30, 2008 21:23
by jaguillard
Once a mouse click has registered with a CEGUI window, is there anyway to grab the coordinates the window was clicked on? Whether it is screen coordinates or window based coordinates doesn't matter.
Posted: Mon Jun 30, 2008 23:16
by earthsruler
Hi!
You can subscribe a "Clicked" callback for the window in question and in the callback cast the EventArgs parameter to a MouseEventArgs. This will let you get the mouse position in screen coordinates.
I don't think there is a way to get it at a later time, so if you need to know at a later date you can use the callback to get the position and store it untill you need it.
HTH.
ER.