Next: Some examples of usage:
Up: Receiving input from the
Previous: Some examples of usage:
Contents
Index
Currently, mouse events can be accepted from the user during program execution via three primitives: readmouse, mousepos and mouse?.
readmouse: the program is paused until the user presses the mouse. Then, it returns a number that represents the event.
These are the differents values:
0The mouse has moved
1The button 1 has been pressed
2The button 2 has been pressed
...
The button 1 is the left button , the button 2 is the next on the right ...
mousepos, mouseposition: Returns a list that contains the position of the mouse.
, mouse?: Returns true if we touch the mouse since the program begins. Returns false otherwise.
Loïc
2008-06-08