Mouse click coordinates
Moderators: CEGUI MVP, CEGUI Team
-
- Just popping in
- Posts: 12
- Joined: Wed Jun 04, 2008 21:24
Mouse click coordinates
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.
-
- Quite a regular
- Posts: 74
- Joined: Mon Apr 28, 2008 23:21
- Location: Australia
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.
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.
Who is online
Users browsing this forum: No registered users and 6 guests