Page 1 of 1

Tooltips that wont disappear!?

Posted: Sat Sep 03, 2005 16:20
by malachy1681
Okay, I've used the following line to set the global tooltip widget:

Code: Select all

CEGUI::System::getSingleton().setTooltip ( "QMXGUI/Tooltip" );


But now I get empty tooltips popping up on everything that doesn't even have 'TooltipText' assigned. I also take it I have to do something to have the tooltip disappear after the mouse leaves the widget?

Re: Tooltips that wont disappear!?

Posted: Sun Sep 04, 2005 13:16
by CrazyEddie
This happens when the underlying renderer does not do alpha blending (as is the case for Irrlicht). It's a bit of a bug and I'll fix it before 0.4.0 is released.

Re: Tooltips that wont disappear!?

Posted: Sun Sep 04, 2005 13:23
by malachy1681
Okay, will I'm using OGRE, which I thought did support alpha blending. I did get around it by not defining a global tooltip and just created a tooltip object and then associated it with the widget I wanted, but is there a way to get it to follow the mouse and then disappear when the cursor leaves the widget?

Re: Tooltips that wont disappear!?

Posted: Mon Sep 05, 2005 08:28
by CrazyEddie
Yeah, tooltips in Ogre should work fine - it's one of the platforms I test on regularly and I've noticed no strangeness. I assume you're correctly injecting time pulses?

To get the tooltip to follow the cursor within a window, you have to basically subscribe the EventMouseMove for the desired window(s), and then in the handler do something like this:

Code: Select all

Tooltip* tt = theWindow->getTooltip();

if (tt)
    tt->positionSelf();


You'll need a recent CVS (v0-4 branch) version for this to work, as the positionSelf method has only recently been made public.