device_mouse_check_button_pressed(device, button);
Argument | Description |
---|---|
device | The device (from 0 - 4) that is being checked. |
button | The button of the device that is being checked. |
Returns: Boolean
This function returns true (1) or false (0) depending on whether the device that you specify has been pressed or not. Now, the device refers to the mouse number, which can be from 0 to 4 and
this event is triggered when the touch screen of a mobile device is touched, so in this way you can test for up to 5 different screen touches. This function is only triggered once by the actual pressing action, and the
standard constants of mb_left and mb_right can be used to check for either button.
if device_mouse_check_button_pressed(0, mb_left) press=true;
The above code checks to see if the device has been pressed and sets a variable to true if it has.