Phaser API Documentation

  Version: 
<readonly> button: number

Description:

A read-only property that indicates which button was pressed, or released, on the pointer during the most recent event. It is only set during up and down events.

On Touch devices the value is always 0.

Users may change the configuration of buttons on their pointing device so that if an event's button property is zero, it may not have been caused by the button that is physically left–most on the pointing device; however, it should behave as if the left button was clicked in the standard button layout.

Type:
number
Default: 0
Since: 3.18.0
Source: src/input/Pointer.js (Line 107)