DeviceButton
Class: Phaser.DeviceButton
Constructor
new DeviceButton(parent, buttonCode)
DeviceButtons belong to both Phaser.Pointer
and Phaser.SinglePad
(Gamepad) instances.
For Pointers they represent the various buttons that can exist on mice and pens, such as the left button, right button,
middle button and advanced buttons like back and forward.
Access them via Pointer.leftbutton
, Pointer.rightButton
and so on.
On Gamepads they represent all buttons on the pad: from shoulder buttons to action buttons.
At the time of writing this there are device limitations you should be aware of:
- On Windows, if you install a mouse driver, and its utility software allows you to customize button actions
(e.g., IntelliPoint and SetPoint), the middle (wheel) button, the 4th butto