GetObject() public method

public GetObject ( string url ) : GObject
url string
return GObject
Example #1
0
        private void SetErrorState()
        {
            if (!showErrorSign || !Application.isPlaying)
            {
                return;
            }

            if (_errorSign == null)
            {
                if (UIConfig.loaderErrorSign != null)
                {
                    if (errorSignPool == null)
                    {
                        errorSignPool = new GObjectPool(Stage.inst.CreatePoolManager("LoaderErrorSignPool"));
                    }

                    _errorSign = errorSignPool.GetObject(UIConfig.loaderErrorSign);
                }
                else
                {
                    return;
                }
            }

            if (_errorSign != null)
            {
                _errorSign.SetSize(this.width, this.height);
                ((Container)displayObject).AddChild(_errorSign.displayObject);
            }
        }
Example #2
0
        private void SetErrorState()
        {
            if (!showErrorSign)
            {
                return;
            }

            if (_errorSign == null)
            {
                if (UIConfig.loaderErrorSign != null)
                {
                    if (errorSignPool == null)
                    {
                        errorSignPool = new GObjectPool();
                    }

                    _errorSign = errorSignPool.GetObject(UIConfig.loaderErrorSign);
                }
                else
                {
                    return;
                }
            }

            if (_errorSign != null)
            {
                _errorSign.SetSize(this.width, this.height);
                ((Container)displayObject).AddChild(_errorSign.displayObject);
            }
        }
Example #3
0
        public GObject GetFromPool(string url)
        {
            if (string.IsNullOrEmpty(url))
            {
                url = defaultItem;
            }

            return(_pool.GetObject(url));
        }
 static public int GetObject(IntPtr l)
 {
     try {
         FairyGUI.GObjectPool self = (FairyGUI.GObjectPool)checkSelf(l);
         System.String        a1;
         checkType(l, 2, out a1);
         var ret = self.GetObject(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #5
0
 static int GetObject(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FairyGUI.GObjectPool obj = (FairyGUI.GObjectPool)ToLua.CheckObject(L, 1, typeof(FairyGUI.GObjectPool));
         string           arg0    = ToLua.CheckString(L, 2);
         FairyGUI.GObject o       = obj.GetObject(arg0);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #6
0
        private void SetErrorState()
        {
            if (!showErrorSign)
            {
                return;
            }

            if (_errorSign == null)
            {
                if (UIConfig.loaderErrorSign != null)
                {
                    _errorSign = errorSignPool.GetObject(UIConfig.loaderErrorSign);
                }
            }

            if (_errorSign != null)
            {
                _errorSign.width  = this.width;
                _errorSign.height = this.height;
                _errorSign.grayed = grayed;
                ((Container)displayObject).AddChild(_errorSign.displayObject);
            }
        }