public EleImg PushImage(Sprite sprite, float proportion, LFlag flags)
        {
            EleImg ret = this.AddImage(sprite, proportion, flags);

            if (ret == null)
            {
                return(null);
            }

            this.stack.Push(this.head);

            this.head = new Entry(ret);
            return(ret);
        }
        public EleImg AddImage(Sprite sprite, float proportion, LFlag flags)
        {
            EleBaseSizer szr = this.head.GetSizer();

            if (szr == null)
            {
                return(null);
            }

            EleImg img = this.uiFactory.CreateImage(this.head.rect, sprite);

            szr.Add(img, proportion, flags);
            return(img);
        }
 public static PxPre.UIL.EleImg Chn_SetImgType(this PxPre.UIL.EleImg img, UnityEngine.UI.Image.Type type)
 {
     img.Img.type = type;
     return(img);
 }
 public static PxPre.UIL.EleImg Chn_SetImgFillCenter(this PxPre.UIL.EleImg img, bool fillCenter)
 {
     img.Img.fillCenter = fillCenter;
     return(img);
 }
 public static PxPre.UIL.EleImg Chn_SetColor(this PxPre.UIL.EleImg img, Color c)
 {
     img.Img.color = c;
     return(img);
 }
 public static PxPre.UIL.EleImg Chn_SetImgSliced(this PxPre.UIL.EleImg img)
 {
     return(img.Chn_SetImgType(UnityEngine.UI.Image.Type.Sliced));
 }
Exemple #7
0
        public EleImg CreateImage(EleBaseRect parent, Sprite sprite, string name = "")
        {
            EleImg ret = new EleImg(parent, sprite);

            return(ret);
        }