# TouchBindingDoc

> Talos next · Since 0.6

A touch source: a screen region (normalised 0..1, origin top left) and what a finger in it does.

## Signature

```ts
export interface TouchBindingDoc {
  /** What a finger in the region does: `stick` and `drag` are axes, `button` and `tap` are buttons. */
  mode: "stick" | "drag" | "button" | "tap"
  /** The region, normalised 0..1 of the screen with the origin at the top left. */
  region: { x: number; y: number; w: number; h: number }
  /** `stick` only: measure from the region's centre instead of where the finger landed. Default false. */
  fixed?: boolean
  /** Whether `region` is relative to the platform's safe area rather than the whole screen. Default true. */
  safeArea?: boolean
}
```

Import: `import type { TouchBindingDoc } from "@argus/gameplay"`

## Members

| Member | Signature | Description |
|---|---|---|
| `mode` | `mode: "stick" \| "drag" \| "button" \| "tap"` | What a finger in the region does: `stick` and `drag` are axes, `button` and `tap` are buttons. |
| `region` | `region: { x: number; y: number; w: number; h: number }` | The region, normalised 0..1 of the screen with the origin at the top left. |
| `fixed` | `fixed?: boolean` | `stick` only: measure from the region's centre instead of where the finger landed. Default false. |
| `safeArea` | `safeArea?: boolean` | Whether `region` is relative to the platform's safe area rather than the whole screen. Default true. |
