Author Topic: Is there a example for hover tooltip?  (Read 1894 times)


  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Is there a example for hover tooltip?
« on: January 19, 2014, 11:36:02 AM »
Here is what I am thinking, I want to build a list of interactive area, and when player moves mouse over one of it, there will be some text at the the fix position, for example, at the the bottom of the screen, to act as description text. And then player moves mouse over other area, the text will be changed accordingly.

My solution will be using onHover on every interactive area, and use send massage or delegate to tell the main script which area is hovering, and to show the text accordingly.

But if there is a better solution already integrated in NGUI, I'd love to know it.



  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 2
  • Posts: 56
    • View Profile
Re: Is there a example for hover tooltip?
« Reply #1 on: January 19, 2014, 05:04:15 PM »
Check out the example scene "Character" that is provided by NGUI, it has tooltips for when you hover over an item.  You can easily replicate the example to suit your needs.   :D


The function for calling a tooltip is "OnTooltip(bool show)".  It is located in the UIItemSlot.cs.
You can change the speed at which the tooltip appears in the UICamera inspector.