Example #1
0
        private void __uiResLoaded(object content)
        {
            if (content == null)
            {
                SetErrorState();
                return;
            }

            if (_contentType == "image")
            {
                _contentData = (TextureRef)content;
                _contentData.AddRef();
                if (_image == null)
                {
                    _image = new Image();
                }
                _image.texture    = _contentData.Texture;
                _image.scale9Grid = _contentItem.scale9Grid;
                SetContent(_image);
            }
            else
            {
                SetContent((DisplayObject)(content));
            }
        }
Example #2
0
 private void __imageLoaded(object content)
 {
     _loading = false;
     if (content == null)
     {
         _source          = null;
         _content.texture = null;
     }
     else
     {
         _source = (TextureRef)content;
         _source.AddRef();
         _content.texture = _source.Texture;
     }
     HandleSizeChanged();
 }