# GamePadButton

Class · category: Input Devices

Source: https://github.com/playcanvas/engine/blob/970d89f6d3bc6667f4e1f88153abd6e7e82ed52c/src/platform/input/game-pads.js#L268

A GamePadButton stores information about a button from the Gamepad API.

## Properties

### pressed

```ts
pressed: boolean = false
```

Whether the button is currently down.

### touched

```ts
touched: boolean = false
```

Whether the button is currently touched.

### value

```ts
value: number = 0
```

The value for the button between 0 and 1, with 0 representing a button that is not pressed, and 1 representing a button that is fully pressed.

### wasPressed

```ts
wasPressed: boolean = false
```

Whether the button was pressed.

### wasReleased

```ts
wasReleased: boolean = false
```

Whether the button was released since the last update.

### wasTouched

```ts
wasTouched: boolean = false
```

Whether the button was touched since the last update.
