Page 1 of 1

Status of tooltips?

Posted: Tue Jul 05, 2005 01:53
by CombatWombat
Hi, I note that there seems to be some code in CEGUI to support tooltips.

I've tried placing a tooltip window within a button window with various options in the layout file. Search results haven't turned up anything definitive on this matter.

I note that spannerman's Ogre particle editor implements the tooltips through static text items, but I'd prefer not to reinvent or copy and paste the wheel if this functionality exists in CEGUI :)

Can anyone point me toward some XML or C++ which uses the CEGUITooltip element?

Thanks for any light you can shed on this one!

Re: Status of tooltips?

Posted: Tue Jul 05, 2005 07:42
by CrazyEddie
Hi,

Tooltip usage is somewhat different to all other windows. Basic usage is very simple though, so without getting into anything too advanced, what you do is this:

First, use set the default tooltip type in the system singleton:

Code: Select all

System::getSingleton().setTooltip("TaharezLook/Tooltip");


Now set the tooltip text on your windows:

Code: Select all

myButton->setTooltipText("Format the hard disk!");


There are options to affect timing and the fade effect, and also more advanced possibilities for per-window custom tooltip windows, but the above is what most people will be using.

Note that you need to ensure that you're injecting time pulses via System::injectTimePulse, since the tooltips rely on this for timing purposes.

HTH

CE.

Re: Status of tooltips?

Posted: Tue Jul 05, 2005 09:13
by CombatWombat
Awesome, thanks - just what I was after :)

Posted: Tue Jun 27, 2006 08:37
by Ken
but how to use System::injectTimePulse?