Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: tommitytom on July 03, 2014, 07:21:14 AM
-
Hello forum! Is it possible for a widget to be notified when any of it's children has gained focus? The method I've been using so far is to have events that are triggered within OnSelect on each of the child widgets, which is picked up by the parent. This has worked fine so far, but it doesn't scale very well as I intend to make my layouts more complex. Thanks!
-
I'll take that as a "no"?
-
If you set UICamera.genericEventHandler to something, that object will receive a copy of all events going out to other objects, whether they were handled or not. You can add your logic there so that it's all in one place.
Alternatively you have to attach scripts to your child objects to UIForwardEvents to your parent object, or UIEventTrigger a function directly.