GetFromPool() публичный Метод

public GetFromPool ( string url ) : GObject
url string
Результат GObject
Пример #1
0
        GButton CreateItem(string caption, Delegate callback)
        {
            GButton item = _list.GetFromPool(_list.defaultItem).asButton;

            item.title  = caption;
            item.grayed = false;
            Controller c = item.GetController("checked");

            if (c != null)
            {
                c.selectedIndex = 0;
            }
            item.RemoveEventListeners(EVENT_TYPE);
            if (callback is EventCallback0)
            {
                item.AddEventListener(EVENT_TYPE, (EventCallback0)callback);
            }
            else
            {
                item.AddEventListener(EVENT_TYPE, (EventCallback1)callback);
            }

            item.onRollOver.Add(__rollOver);
            item.onRollOut.Add(__rollOut);

            return(item);
        }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="caption"></param>
        /// <param name="index"></param>
        /// <param name="callback"></param>
        /// <returns></returns>
        public GButton AddItemAt(string caption, int index, EventCallback0 callback)
        {
            GObject obj = _list.GetFromPool(_list.defaultItem);

            _list.AddChildAt(obj, index);

            GButton item = (GButton)obj;

            item.title  = caption;
            item.data   = callback;
            item.grayed = false;
            Controller c = item.GetController("checked");

            if (c != null)
            {
                c.selectedIndex = 0;
            }

            return(item);
        }
Пример #3
0
 static public int GetFromPool(IntPtr l)
 {
     try {
         FairyGUI.GList self = (FairyGUI.GList)checkSelf(l);
         System.String  a1;
         checkType(l, 2, out a1);
         var ret = self.GetFromPool(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static int GetFromPool(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FairyGUI.GList   obj  = (FairyGUI.GList)ToLua.CheckObject(L, 1, typeof(FairyGUI.GList));
         string           arg0 = ToLua.CheckString(L, 2);
         FairyGUI.GObject o    = obj.GetFromPool(arg0);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }