Page 1 of 1

tooltips

Posted: Fri Jul 03, 2009 11:43
by lali
I am using CEGUI with Ogre and I want to use the CEGUI tooltip using WindowsLook/Tooltip on my ogre entities. When th emouse is on an entity, I create a tooltip :

Code: Select all

win = (CEGUI::Tooltip *)CEGUI::WindowManager::getSingleton().createWindow("WindowsLook/Tooltip", "Tooltip");
win->setText("This is a test");
win->setFadeTime(1.0);
win->setHoverTime(4.0);
win->setFont("myfont");
win->setAlwaysOnTop(true);
win->sizeSelf();
win->positionSelf();

But I don't see anything showing up and there are no errors in the log.
I have tooltips working well on CEGUI entities but I would like to extend that to Ogre objects.

Thanks,

Re: tooltips

Posted: Sat Jul 04, 2009 20:26
by CrazyEddie
The Tooltip is somewhat specialised in that it really needs a 'target window' and is wired to that as far as notifications go which is what makes it work (mouse enters, mouse leaves, this type of stuff) - while there are likely a couple of nasty hacks you could pull off to get it to work, it may be a better design to use another window type and just emulate the tooltip look and behaviour.

CE.