mouse is moving or not?


17-03-2008 11:01:49

hi again,

how to know if the mouse are moving or not?
i have this:
when the mouse move it's works fine but i don't know how to do someting if the mouse aren't moving...


17-03-2008 16:55:46

Currently there is no functionality to tell you if the mouse is idle, but that's a really good suggestion! Something like EVENT_MOUSE_IDLE. Its not implemented now. You could try altering your code and making use of EVENT_DRAGGED and EVENT_DROPPED events, assuming its acceptable to left click and drag to drag the power line.


17-03-2008 17:57:39

EVENT_MOUSE_IDLE will be good however EVENT_DRAGGED and EVENT_DROPPED it's fine, i'm trying with this now.


24-03-2008 12:32:51

Another question about addEventHandler:
i have this:
but i use the two buttons of the mouse. how to set this event to the left mouse button?



24-03-2008 17:21:07

Inside the event handler you will need to cast the EventArgs into MouseEventArgs, and see what button was pressed.

const MouseEventArgs mea = dynamic_cast<const MouseEventArgs&>(EventArgs);

if(mea.buttonID == MB_LEFT)

This code hasn't been tested, I wrote it off the top of my head.


25-03-2008 10:45:45

thank you so much kungfoomasta!! :)