MouseButton

Category: Input

Back to System Functions


Signature

MouseButton(buttonIndex As Integer)

Returns

Boolean

Description

Returns True while the specified mouse button is currently pressed.

Button indexes are 0 for the left button, 1 for the right button, and 2 for the middle button.

Example

If MouseButton(0) Then DrawImage(cursorImage, MouseX(), MouseY()) End If