Search Unity

Tooltip with GUI.Window Problem

Discussion in 'Immediate Mode GUI (IMGUI)' started by careyagimon, Jul 6, 2008.

  1. careyagimon

    careyagimon

    Joined:
    Dec 20, 2007
    Posts:
    209
    I can't get tooltips from controls in a GUI.Window to show up. Is this something that is a known problem? Is there something special I have to do? As far as I can tell it should be working. The controls have tooltips, the GUI.Label to display the tooltip is after the window call. The GUI.tooltip just remains empty. Any ideas?
     
  2. Marc

    Marc

    Joined:
    Oct 4, 2007
    Posts:
    499
    I seen this happen to and reported it as a bug. Case: 27084

    Maybe you should report it to. The more info the faster the fix (if is indeed a bug). I also think this suffers from the same problem as GUI.changed beeing true all the time in GUI.Window (which i know UT is trying to fix)

    Regards,
    Marc
     
  3. CoherentInk

    CoherentInk

    Joined:
    Jul 16, 2006
    Posts:
    216
    Has there been any progress on this? Without the full ticket number, I can't see the status of the bug report.
     
  4. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    I can get them to show up in a window by putting the tooltip code in the window and not directly in OnGUI, the problem is though that they then get clipped against the window rect so often they aren't fully readable, I haven't found a way round that yet as windows seem to get drawn last. All rather annoying.
     
  5. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    Just had a thought, I'm going to try making the tooltip itself as a window, it's a similar trick to using a window for a custom cursor....
     
  6. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    hey it works!
     
  7. kko

    kko

    Joined:
    Jan 26, 2010
    Posts:
    4
    Thanks for pointing this out, it saved my day. Actually I tried everything, but nothing seemed to fully work.
    For all you guys struggling with tooltips and windows, the window containing tooltips must be rendered last to work. GUI.BringWindowToFront() hack comes in handy.

    BTW: It's a shame that after more than 3 years of complaining the framework still lacks such a basic functionality...
     
  8. JRule

    JRule

    Joined:
    Nov 17, 2009
    Posts:
    11
    What I did to get tooltips working was to make a separate script for rendering tool tips with a GUI.depth of 0. I do the same thing with tutorials and custom cursors so they will draw over windows.