Skip to content

label

A text element. Use it for headings, instructions, scoreboard rows, or any data the player needs to read. Supports {key} placeholders that resolve against screen.data, so live values update automatically when the host calls UpdateScreenData.

Display only — labels never emit input events.

C# factory

WidgetDefinitions.Label(
id: "score",
text: "Score: {score}",
positionX: 0.5f, positionY: 0.1f,
sizeW: 0.8f, sizeH: 0.1f,
style: "title",
align: "center",
color: "#ffffff"
);

Wire format

FieldTypeRequiredNotes
idstringyes
type"label"yes
position_x, position_y, size_w, size_hnumberno0..1 anchor + size.
textstringnoLiteral or with {key} bindings against screen.data.
style"title" | "subtitle" | "body" | "caption"noTypographic preset. Default "body".
align"left" | "center" | "right"noHorizontal alignment.
colorstringno7-digit hex.

Events

Display only.

Example

// Update the bound value at runtime — every connected phone re-renders.
manager.UpdateScreenDataForAll("game", new { score = currentScore });