|
Author |
Topic: When are mouse things called? (Read 212 times) |
|
skloopy
|
When are mouse things called?
« on: Feb 9th, 2004, 8:25pm » |
|
Hey i'm writing a little applet that checks if the mouse is within a certain radius around an x and y that are calculated during loop(). my question is, for dragging purposes, are mousePressed and others called after or before loop()?
|
|
|
|
REAS
|
Re: When are mouse things called?
« Reply #1 on: Feb 10th, 2004, 8:44am » |
|
they are called whenever they happen, regardless of the loop. for example, if the mouse is clicked when the loop is half finished drawing, the mousePressed() code will execute, and then the loop will continue. mouseMoved() is called whenever the mouse moves and mouseDragged() is called whenever the mouse is moved and the button is clicked. keep in mind that the code in the mouse events are only called once for each event. the code in mousePressed(), for example, will only be executed once even if the mouse button is held down. It won't be called again, until the button is released and clicked again.
|
|
|
|
|