JoystickButton()

Syntax

Result = JoystickButton(#Joystick, Button)
Description
Returns the joystick button state.

Parameters

#Joystick The joystick to use. The first joystick index is 0. The number of available joysticks is returned by InitJoystick().
Button The joystick button to query. The first button index is 1.
Return zero if the specified button is not pressed, else it returns nonzero. Any number of buttons may be pressed at the same time.

Remarks

ExamineJoystick() has to be called before this function is used, to update the current joystick state.

See Also

ExamineJoystick()

Supported OS

All

<- JoystickAxisZ() - Joystick Index - JoystickName() ->