Skip to content

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

FieldTypeRequiredNotes
idstringyes
type"tap_area"yes
labelstringnoCentered text. Supports {key} bindings.
colorstringno7-digit hex fill.

A tap_area fills its containing screen by default — no position_* or size_* needed.

Events

Event typePayloadFires 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);
}
};