# Blitz3D Docs

# WaitMouse()

# Parameters

None.

# Description

This command makes your program halt until a mouse button is pressed on the mouse. Used alone, it simply halts and waits for a button press. It can also be used to assign the pressed button's code value to a variable. See example.
In MOST CASES, you are not going to want to use this command because chances are likely you are going to want things on the screen still happening while awaiting the button press. In that situation, you'll use a WHILE ... WEND awaiting a MouseHit value - refreshing your screen each loop.

# Example

; WaitMouse() sample Print "Press a mouse button to continue." button=WaitMouse() Print "The mouse button code of the button you pressed was: " + button Print "Now press a button to quit." WaitMouse() End

Index
Click here to view the latest version of this page online