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);
                    }
                }
            }
        }
예제 #2
0
        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);
                }
            }
        }