MouseButton()

Syntax

Result = MouseButton(Button)
Description
Returns zero if the specified button number is not pressed, else the button is pressed. Any number of buttons can be pressed at the same time. ExamineMouse() must be called before this function to update the actual button's state.

Parameters

Button It can be one of the following constants:
  #PB_MouseButton_Left  : Tests if the left mouse button is pressed
  #PB_MouseButton_Right : Tests if the right mouse button is pressed
  #PB_MouseButton_Middle: Tests if the middle mouse button is pressed

Return value

Nonzero if the specified mouse button is pressed, zero otherwise.

See Also

ExamineMouse()

Supported OS

All

<- InitMouse() - Mouse Index - MouseDeltaX() ->