MouseHit

Category: Input

Back to System Functions


Signature

MouseHit(buttonIndex As Integer)

Returns

Boolean

Description

Returns True on the frame when the specified mouse button is pressed.

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

Use MouseHit when you want a single press event instead of a continuous held-down state.

Example

If MouseHit(0) Then Print "Clicked" End If