Author Topic: [Solved] Way to forward events?  (Read 1546 times)

Peacewise

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 12
    • View Profile
[Solved] Way to forward events?
« on: June 22, 2014, 03:52:13 PM »
I have a UI with buttons that have icons that overflow. Imagine a button with an icon sticking off the top of it. The icons need their own colliders so they can be grabbed to drag a ScrollView.

I want the icons to behave like an extension of the button (hover changes button color, clicking activates button, etc). But currently, clicking the icon blocks the click from reaching the button.

Is there a way to link or forward button behavior to the actual button?
« Last Edit: June 23, 2014, 12:22:09 AM by Peacewise »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
There are a few ways. UIForwardEvents is the easiest one if you're going down the Inspector route and want to simply forward events.

Peacewise

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 12
    • View Profile
Thank you. That is exactly what I was looking for. Worked like a charm!
(I feel moderately silly for not having found it, given the name. It's a well-named component, sir.)