Skip to content

Components

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

FieldScript nameKindDefaultWhat it does
TexturetextureassetnoneA picture to draw the box with, or none for a flat box.
Borderbordernumber, at least 00Width of the picture's nine-slice border, so its corners keep their size as the box grows.
Panelpanelcolour#010101The box's colour, or the tint on its picture.
Edgeedgecolour#090e0dThe colour of a thin frame just outside the box, or fully see-through for no frame.
Inkinkcolour#b8c6bcThe colour of the words.
Scalescalenumber, 0.1 to 16, step 0.051How big the words are, as a Text's scale is.
Paddingpaddingtwo numbers (x, y), at least 0(6, 4)The space between the words and the box's edge, across and down.
Max Widthmax_widthnumber, at least 00The widest the box may grow before its words wrap onto another line, or zero to keep them on one line.