tap_area
A whole-region tap surface. Useful for reaction games (“tap when the light turns green”), quick-fire interactions, or as a fallback when the entire phone screen should act as one big button.
C# factory
WidgetDefinitions.TapArea( id: "go", label: "Tap when ready", color: "#22c55e");Wire format
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
type | "tap_area" | yes | |
label | string | no | Centered text. Supports {key} bindings. |
color | string | no | 7-digit hex fill. |
A tap_area fills its containing screen by default — no position_* or size_* needed.
Events
| Event type | Payload | Fires when |
|---|---|---|
press | {} | Pointer down on the surface. |
Example
manager.OnInput += (player, evt) =>{ if (evt.WidgetId == "go" && evt.EventType == "press") { var elapsed = Time.realtimeSinceStartup - startTime; leaderboard.Submit(player.Id, elapsed); }};