Tool Tips

Normal tool tip

Tool tips are usually just labels, which is exactly what you get if you create a tool tip with one of the themes shipped with TGUI.

tgui::Label::Ptr toolTip = theme->load("ToolTip");
Tool Tip Label

Special tool tip

But the tool tip does not has to be a label, it can be any widget. Here I used a Picture but you could also use a Panel and make the tool tip as complex as you want.

tgui::Picture::Ptr toolTip = tgui::Picture::create("image.png");
Tool Tip Picture


There also exists a ToolTip class in which you find static function to change the time before the tool tip shows up and the distance between the mouse and the tool tip. Setting the display time to 0 will cause the tool tip to always be visible when the mouse is on top of the widget.

tgui::ToolTip::setDistanceToMouse({4, 8});