Jump to content
Sign in to follow this  
Instynct

getMousePosition ? Does it exist

Recommended Posts

I'm trying to set a control elements position from my dialog to my mouse location but I can't find any methods for getting the mouse cursor location. Any help?

Share this post


Link to post
Share on other sites

But that won't really work in my context, I just need to get the mouse position once, not every time it moves. I need to get the position inside of another event handler to set the position of a different control.

Like this -> User clicks a button -> get mouse position -> set another control to that position.

And another problem I'm having is the MouseEnter and MouseExit event handlers don't work at all....

Easily the worst UI system i've ever seen in a game.

Edited by Instynct

Share this post


Link to post
Share on other sites

Save your mouse position with this event handler periodically into array and address this array elsewhere when needed.

Share this post


Link to post
Share on other sites
Save your mouse position with this event handler periodically into array and address this array elsewhere when needed.

I've tried this, the problem is the first event handler always starts before the one that can get the mouse position and there's no way to set priority to which one starts first.

Share this post


Link to post
Share on other sites

Are you sure you save it into proper namespace and global variable?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×