Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Echo on October 14, 2012, 06:53:39 PM

Title: void OnHover
Post by: Echo on October 14, 2012, 06:53:39 PM
If I want some widgets to pop up when I hover over something like in the Orc scene demo, how would I go about doing this? Should I instantiate a prefab? In my case I only want text and a box behind it. Thanks in advance.
Title: Re: void OnHover
Post by: JRoch on October 15, 2012, 03:21:36 AM
Perhaps examine the code of the demo in question to find out how it was done there?
Title: Re: void OnHover
Post by: Echo on October 20, 2012, 06:47:42 PM
Perhaps examine the code of the demo in question to find out how it was done there?
He's using a random item generator thing, which is overly complex for what I need.
Title: Re: void OnHover
Post by: ArenMook on October 20, 2012, 09:10:41 PM
UITooltip is what's used to show that widget you see. Just look at that component, and don't worry about random item generation. All components receive an "OnTooltip" notification. What you do with it is up to you. I implemented UITooltip to take advantage of this notification and to display something.