TextField
A box to type into: a player’s name, the address of a game to join. Click it (or pick it with the arrow keys and press Enter) and type; Enter or a click elsewhere finishes. It shows its Value in the entity’s Text.
Requires: Text (shows what’s typed)
In a network game, each machine keeps its own entity with this on it: it isn’t sent.
Properties
Section titled “Properties”Each is listed as its key in the scene file and the MCP tools, then its kind of value, its default and what it does.
value: text = null. What’s typed in it. (Plain text: what’s typed in it.) (Field: text.)placeholder: text = null. Shown, faded, while it’s empty, e.g. “Your name”. (Plain text: words it shows.) (Field: text.)maxLength: a whole number = 24. The longest it can get. (Field: a number.)size: [x, y] = [5,1]. The clickable area, centered on the entity, in world units before its scale. (A rectangle’s size, around the entity, in its own units before its scale: with Resize handles the Scene view puts handles on its edges and corners to drag.) (Field: a vector.)use: one of None, PlayerName, JoinAddress = “None”. What it’s for: a player name or an address it fills in (and remembers) for network games. (Field: one of its values.)
While the game runs
Section titled “While the game runs”Not saved with the scene; scripts read them, and entity_get shows them as live while the game plays.
isFocused: true or false. True while typing goes into it.
Scripts use it as TextField: its methods, events and values that aren’t saved with the scene.