Support => NGUI 3 Support => Topic started by: richardwood on August 29, 2014, 02:15:45 PM
Title: How do you use tooltip?
Post by: richardwood on August 29, 2014, 02:15:45 PM
Hey, is there a short tutorial on how to implement tooltip? I've been tinkering around and confused. I want a tooltip appear when users hover to sprite and not moving cursor. So I put this on the sprite
publicvoid OnTooltip()
{
Debug.Log("triggered");
}
it does nothing. need help Thanks!
Title: Re: How do you use tooltip?
Post by: Yukichu on August 29, 2014, 06:14:55 PM
You have to roll your own for more options, but the basics are:
void OnTooltip(bool show)
{
if(show)
{
ShowText("Some text");
}
else
{
ShowText("");
}
}
Setting the value to empty string or null makes the tooltip go away.
Title: Re: How do you use tooltip?
Post by: richardwood on August 30, 2014, 01:47:06 AM