Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: p3nguinc4g3 on January 27, 2014, 12:32:59 PM

Title: Finding the original event target using EventDelegate
Post by: p3nguinc4g3 on January 27, 2014, 12:32:59 PM
I'm setting up a grid panel that gets populated with a lot of buttons at run time. I'd like to be able to have the containing menu attach an event listener that listens for the click function of the button and then do some updates based on the initializing parameters of the button. With the previous event system, UIEventListener, this was easy because the click delegate has parameters that allowed you to easily identify the target of the event. I've been unable to find a way to do this with the new system using EventDelegate. Is there a way to designate function parameters or find the event target when using EventDelegate?
Title: Re: Finding the original event target using EventDelegate
Post by: ArenMook on January 27, 2014, 06:22:47 PM
UIButton.current tells you which button called the OnClick delegate.