static void GetChildEventListeners(string strType, GComponent container, List <EventListener> listeners) { EventListener listener = container.GetEventListener(strType); if (listener != null) { listeners.Add(listener); } int count = container.numChildren; for (int i = 0; i < count; ++i) { GObject obj = container.GetChildAt(i); if (obj is GComponent) { GetChildEventListeners(strType, (GComponent)obj, listeners); } else { listener = obj.GetEventListener(strType); if (listener != null) { listeners.Add(listener); } } } }
static void GetChildEventListeners(string strType, GComponent container, List<EventListener> listeners) { EventListener listener = container.GetEventListener(strType); if (listener != null) listeners.Add(listener); int count = container.numChildren; for (int i = 0; i < count; ++i) { GObject obj = container.GetChildAt(i); if (obj is GComponent) GetChildEventListeners(strType, (GComponent)obj, listeners); else { listener = obj.GetEventListener(strType); if (listener != null) listeners.Add(listener); } } }