TooltipStyle
How the tooltips on this canvas look: a flat box or a picture, a thin frame round it, the colour, size and spacing of the words, and how far they run before wrapping. Without it a tooltip is a dark box with light words. Goes on a Canvas.
On this page
Add it
Add component → TooltipStyleComponent in the Inspector, on the node that should carry it.
From a script
A script on the same node writes these fields by name. TooltipStyleComponent is the name to pass.
rgs
set_number("TooltipStyleComponent", "border", 0.0);
set_colour("TooltipStyleComponent", "panel", vec4(0.0033465356, 0.005181517, 0.005181517, 1.0));
set_colour("TooltipStyleComponent", "edge", vec4(0.036889445, 0.056128494, 0.049706563, 1.0));
set_colour("TooltipStyleComponent", "ink", vec4(0.72305524, 0.77582234, 0.73791057, 1.0));
set_number("TooltipStyleComponent", "scale", 1.0);
set_point("TooltipStyleComponent", "padding", vec2(6.0, 4.0));
set_number("TooltipStyleComponent", "max_width", 0.0); Fields
| Field | Script name | Kind | Default | What it does |
|---|---|---|---|---|
| Texture | texture | asset | none | A picture to draw the box with, or none for a flat box. |
| Border | border | number, at least 0 | 0 | Width of the picture's nine-slice border, so its corners keep their size as the box grows. |
| Panel | panel | colour | #010101 | The box's colour, or the tint on its picture. |
| Edge | edge | colour | #090e0d | The colour of a thin frame just outside the box, or fully see-through for no frame. |
| Ink | ink | colour | #b8c6bc | The colour of the words. |
| Scale | scale | number, 0.1 to 16, step 0.05 | 1 | How big the words are, as a Text's scale is. |
| Padding | padding | two numbers (x, y), at least 0 | (6, 4) | The space between the words and the box's edge, across and down. |
| Max Width | max_width | number, at least 0 | 0 | The widest the box may grow before its words wrap onto another line, or zero to keep them on one line. |