Author Topic: void OnHover  (Read 3565 times)

Echo

  • Guest
void OnHover
« 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.

JRoch

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 140
    • View Profile
Re: void OnHover
« Reply #1 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?

Echo

  • Guest
Re: void OnHover
« Reply #2 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.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: void OnHover
« Reply #3 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.