GetChildAt() public method

public GetChildAt ( int index ) : DisplayObject
index int
return DisplayObject
Example #1
0
 static public int GetChildAt(IntPtr l)
 {
     try {
         FairyGUI.Container self = (FairyGUI.Container)checkSelf(l);
         System.Int32       a1;
         checkType(l, 2, out a1);
         var ret = self.GetChildAt(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #2
0
 static int GetChildAt(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FairyGUI.Container obj = (FairyGUI.Container)ToLua.CheckObject <FairyGUI.Container>(L, 1);
         int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         FairyGUI.DisplayObject o = obj.GetChildAt(arg0);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #3
0
        static void GetChildEventBridges(string strType, Container container, List <EventBridge> bridges)
        {
            EventBridge bridge = container.TryGetEventBridge(strType);

            if (bridge != null)
            {
                bridges.Add(bridge);
            }
            if (container.gOwner != null)
            {
                bridge = container.gOwner.TryGetEventBridge(strType);
                if (bridge != null && !bridge.isEmpty)
                {
                    bridges.Add(bridge);
                }
            }

            int count = container.numChildren;

            for (int i = 0; i < count; ++i)
            {
                DisplayObject obj = container.GetChildAt(i);
                if (obj is Container)
                {
                    GetChildEventBridges(strType, (Container)obj, bridges);
                }
                else
                {
                    bridge = obj.TryGetEventBridge(strType);
                    if (bridge != null && !bridge.isEmpty)
                    {
                        bridges.Add(bridge);
                    }

                    if (obj.gOwner != null)
                    {
                        bridge = obj.gOwner.TryGetEventBridge(strType);
                        if (bridge != null && !bridge.isEmpty)
                        {
                            bridges.Add(bridge);
                        }
                    }
                }
            }
        }
        static void GetChildEventListeners(string strType, Container container, List <EventListener> listeners)
        {
            EventListener listener = container.GetEventListener(strType);

            if (listener != null)
            {
                listeners.Add(listener);
            }
            if (container.gOwner != null)
            {
                listener = container.gOwner.GetEventListener(strType);
                if (listener != null && !listener.isEmpty)
                {
                    listeners.Add(listener);
                }
            }

            int count = container.numChildren;

            for (int i = 0; i < count; ++i)
            {
                DisplayObject obj = container.GetChildAt(i);
                if (obj is Container)
                {
                    GetChildEventListeners(strType, (Container)obj, listeners);
                }
                else
                {
                    listener = obj.GetEventListener(strType);
                    if (listener != null && !listener.isEmpty)
                    {
                        listeners.Add(listener);
                    }

                    if (obj.gOwner != null)
                    {
                        listener = obj.gOwner.GetEventListener(strType);
                        if (listener != null && !listener.isEmpty)
                        {
                            listeners.Add(listener);
                        }
                    }
                }
            }
        }
Example #5
0
        static void GetChildEventBridges(string strType, Container container, List<EventBridge> bridges)
        {
            EventBridge bridge = container.TryGetEventBridge(strType);
            if (bridge != null)
                bridges.Add(bridge);
            if (container.gOwner != null)
            {
                bridge = container.gOwner.TryGetEventBridge(strType);
                if (bridge != null && !bridge.isEmpty)
                    bridges.Add(bridge);
            }

            int count = container.numChildren;
            for (int i = 0; i < count; ++i)
            {
                DisplayObject obj = container.GetChildAt(i);
                if (obj is Container)
                    GetChildEventBridges(strType, (Container)obj, bridges);
                else
                {
                    bridge = obj.TryGetEventBridge(strType);
                    if (bridge != null && !bridge.isEmpty)
                        bridges.Add(bridge);

                    if (obj.gOwner != null)
                    {
                        bridge = obj.gOwner.TryGetEventBridge(strType);
                        if (bridge != null && !bridge.isEmpty)
                            bridges.Add(bridge);
                    }
                }
            }
        }
        static void GetChildEventListeners(string strType, Container container, List<EventListener> listeners)
        {
            EventListener listener = container.GetEventListener(strType);
            if (listener != null)
                listeners.Add(listener);
            if (container.gOwner != null)
            {
                listener = container.gOwner.GetEventListener(strType);
                if (listener != null && !listener.isEmpty)
                    listeners.Add(listener);
            }

            int count = container.numChildren;
            for (int i = 0; i < count; ++i)
            {
                DisplayObject obj = container.GetChildAt(i);
                if (obj is Container)
                    GetChildEventListeners(strType, (Container)obj, listeners);
                else
                {
                    listener = obj.GetEventListener(strType);
                    if (listener != null && !listener.isEmpty)
                        listeners.Add(listener);

                    if (obj.gOwner != null)
                    {
                        listener = obj.gOwner.GetEventListener(strType);
                        if (listener != null && !listener.isEmpty)
                            listeners.Add(listener);
                    }
                }
            }
        }