A tooltip workaround hack needed ;)

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
Just popping in
Just popping in
Posts: 16
Joined: Tue Nov 08, 2005 18:17
Location: Fryslan, The Netherlands

A tooltip workaround hack needed ;)

Postby Sponge » Fri Dec 16, 2005 19:26


I want to use CEGUI as much as possible in my game so I don't end up using all kinds of extra font rasterizers and everything. Right now I got a silly problem with the tooltips. They show up allright, and it looks fine.

Except, I want to display them in the game window. Now, the default behavior for a tooltip is NOT to show up more than once if the mouse stays over the same button/picture/whatever. Unfortunately, this also applies to the root window.

right now, to have the tooltip appear twice, I first need to move the mouse out of my game window, to a different window (a toolbar), and move back.

I've tried (and failed):

- resetTimer();
- Changing target window to NULL, and back
- Changing the window tooltiptext to "" when there is NO unit under the mouse cursor.

Like this:

Code: Select all


            //Only update when necassary
            if (wdw->getTooltipText() != tmp)

            //We had a hit!
            bHit = true;
.. loop ..

      //no hit? remove text:
      if (bHit == false)
         //If the tooltip text string is not empty, do that right now and reset timer.
         //if (wdw->getTooltipText() != "")
      //   {
      //      wdw->setTooltipText("");
            Tooltip* pbar = static_cast<Tooltip*>(winMgr.getWindow("Tooltip"));      
      //      pbar->setTargetWindow(NULL);
      //      pbar->setTargetWindow(wdw);
      //   }

Unfortunately, all my attempts have failed at the moment. Ofcourse I can use a statictext object. Ofcourse I can creat my own Tooltip object in CEGUI. But I rather not, since everytime I update to the new versions, I miht have to sort things out again.

Anyone have an interesting 'hack' to fix my problem?

Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 4 guests