LC #42 Pipers Alley

View Full Version : Mouse move callback 2D

09-16-2009, 10:54 AM
Hello everbody!

I'm trying to create dialog window to display errors and warnings, that closes automatically when the mouse cursor has moved a certain distance away from it.

For this I need a callback function that is called whenever the user moves the mouse.
There's global variable that stores the cursor position on the screen at all times: mouse.screenpos - but I would need constant update on that.

Do you know a good way of doing this?


09-16-2009, 12:01 PM
Don't use a callBack, use a timer in the dialog and keep checking the distance the mouse is away from the dialogs position.

09-16-2009, 01:33 PM
Works like a charm, thanks! :)

CGTalk Moderation
09-16-2009, 01:33 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.