Tooltip
Says something about the entity while the mouse rests on it: after Delay it shows Value in a box by the cursor, pinned to the screen, or writes it into the Text named in Into (an info line on the HUD). Works on anything: a sprite in the world, a button, a card on the HUD. Only the topmost one under the mouse shows, and what’s on the screen comes before the world. A script sets Value to change what it says, or it shows an Output, as a Text does.
Works with: Sprite (the part hovered, unless it has a collider or a button); Button (a button’s area is the part hovered)
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 = “Tooltip”. What it says. Several lines are fine. With an Output, how that reads (“{0} cards”). An action’s name in braces becomes the key or button that does it, as in a Text: “Key: {OpenWork}” reads “Key: K”, and follows the device being played with and the player’s own bindings. (While output names an output, how it reads: {0} is the output and {1} what it’s out of, each with a number format after a colon if it says, e.g. “Gold: {0}”, “{0} / {1}” or “{0:0.0} m/s”; without them it shows just the output.) (Field: its own editor: Output Format.)delay: a number = 0.5. Seconds the mouse rests on the entity before it shows (real time, so it works in a pause menu too). (Field: a number.)area: [x, y] = [0,0]. The part of the entity the mouse hovers, in world units before the transform’s scale, centered on it. Zero is the entity’s own: its button’s area, else its collider, else its sprite. (Field: a vector.)into: text = null. A Text to write it into instead of a box by the cursor, by name, e.g. “Hover Info”. While it shows, the text says it; after, the text says what it said before. (Names an entity.) (Field: an entity’s name.)
Showing an Output
Section titled “Showing an Output”track: text = null. An entity whose Output it shows, by name, e.g. “Board”. Empty is this entity, or the nearest one it’s inside with that output. (Names an entity.) (Field: an entity’s name.)output: text = null. Show an output: what it gives now (see component_describe’s Outputs), e.g. a deck’s “Count” or a faction’s “Amount:Gold”. Value is then how it reads, with {0} for the output and {1} what it’s out of, e.g. “{0} / {1} cards”; a Value without them shows just the output. (Names an output of the entity track names, or without one this entity or the nearest it’s inside with it: one component_describe lists under Outputs, any kind, e.g. “Score”, “MatchBoard.Score” for one component’s, or “Amount:Gold” for one read by a name.) (Field: an output’s name.)
Box by the Cursor
Section titled “Box by the Cursor”size: a number = 0.4. Height of a line of the box’s text, in world units, as a Text’s Size on the HUD. (Field: a number.)color: a color, “#RRGGBB” or “#RRGGBBAA” = “#FFFFFFFF”. The color of the box’s letters. (Field: a color.)background: a color, “#RRGGBB” or “#RRGGBBAA” = “#14141AE6”. The color behind them; fully transparent draws no box. (Field: a color.)offset: [x, y] = [0.3,-0.3]. Where the box’s top-left corner sits from the cursor, in world units; right and up are positive. Near the edge of the screen it goes to the other side of the cursor instead. (Field: a vector.)width: a number = 8. Lines wider than this (world units) break between words; 0 never breaks them. (Field: a number.)font: text = null. A font file relative to Assets, as a Text’s Font; empty uses the built-in font. (Names a font.) (Field: a name.)
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.
isHovered: true or false. True while the mouse is over the entity (and it’s the topmost tooltip there).hoveredFor: a number. How long the mouse has rested on it, in seconds of real time; 0 while it isn’t hovered.isShowing: true or false. True while it shows: hovered for its Delay.shown: text. What it says now: Value, with its Output and input prompts (“{Interact}”) filled in while it’s hovered in the game.
Scripts use it as Tooltip: its methods, events and values that aren’t saved with the scene.