gamepad_button_check_pressed(device,button)

From ENIGMA

Jump to: navigation, search

Description

Gets whether or not the given button has been pressed or not on the given gamepad device and returns the result.

Parameters

Parameter Data Type Description
device integer The gamepad index, must be 0 through 3, 0 being player 1.
button integer Gamepad constant of the button.

Return Values

boolean: Returns whether or not the button has been pressed on the gamepad.

Example Call

// demonstrates checking if the back button has been pressed on player 1's controller
if (gamepad_button_check_pressed(0, gp_select)) {
  // back button pressed
} else {
  // back button not pressed
}
Personal tools
Namespaces
Variants
Actions
Navigation
ENIGMA
Other
Toolbox