gamepad_button_check_released

Returns whether a given gamepad button has been released.

Syntax:

gamepad_button_check_released(device, button);


Argument Description
device Which gamepad device "slot" to check.
button Which gamepad button constant to check for.


Returns: Boolean


Description

This function will return true or false depending on whether the given gamepad button is detected as having been released or not. Note that this function will only trigger once for the button the moment it has been released. For it to trigger again the button must first be pressed and then released once more.


Example:

if gamepad_button_check_released(0, gp_select)
   {
   audio_sound_play(snd_Button, 0, false);
   global.Pause = !global.Pause;
   }

The above code will detect whether the "select" button of the gamepad connected to device "slot" 0 has been pressed or not and toggle the global "Pause" variable.


Back: GamePad Input
Next: gamepad_button_count
© Copyright YoYo Games Ltd. 2018 All Rights Reserved