Get_Mouse_Button

Get_Mouse_Button(Which_Button, X, Y)

 

Get_Mouse_Button is a call that puts the location of a mouse click (on the button specified) in its two out parameters, X and Y.  If the mouse has not been clicked in the RaptorGraph window (using the desired mouse button), it will wait until the mouse button has been clicked.  Note that if the program is waiting for a left click and the right mouse is clicked, the right click will be lost.

 

A click consists of both pressing and releasing the mouse.  The X and Y returned are where the mouse button was released.

 

Which_Button must be either Left_Button or Right_Button.

 

Notes:  A graphics window must be open when Get_Mouse_Button is called or a run-time error will occur.  If the RaptorGraph window is not on top, the user may have to click on it once before it will respond to user mouse clicks.

 

Example:

 

Get_Mouse_Button(Left_Button,Mouse_X,Mouse_Y)