示例#1
0
 public override bool HasEntry(Ele child)
 {
     for (int i = 0; i < this.layoutData.Count; ++i)
     {
         if (this.layoutData[i].ele == child)
         {
             return(true);
         }
     }
     return(false);
 }
示例#2
0
 public override bool Remove(Ele child)
 {
     for (int i = 0; i < this.entries.Count; ++i)
     {
         if (this.entries[i].ele == child)
         {
             this.entries.RemoveAt(i);
             return(true);
         }
     }
     return(false);
 }
示例#3
0
        public override bool Remove(Ele child)
        {
            for (int i = 0; i < this.layoutData.Count; ++i)
            {
                if (this.layoutData[i].ele == child)
                {
                    UnityEngine.UI.Text labelToDel = this.layoutData[i].labelText;

                    this.layoutData.RemoveAt(i);

                    if (labelToDel != null)
                    {
                        GameObject.Destroy(labelToDel.gameObject);
                    }

                    return(true);
                }
            }
            return(false);
        }
示例#4
0
        public void Add(Ele child, float proportion, LFlag flags, string label)
        {
            PairedLayoutData pld = new PairedLayoutData();

            pld.ele   = child;
            pld.prop  = proportion;
            pld.style = flags;
            pld.label = label;

            if (string.IsNullOrEmpty(label) == false)
            {
                RTQuick.CreateGameObjectWithText(
                    parent.GetContentRect(),
                    "Label_" + label,
                    out pld.labelText).TopLeftAnchorsPivot();

                this.labelText.Apply(pld.labelText);
                pld.labelText.text = label;
                pld.labelText.horizontalOverflow = HorizontalWrapMode.Overflow;
                pld.labelText.verticalOverflow   = VerticalWrapMode.Overflow;
            }

            layoutData.Add(pld);
        }
示例#5
0
 public static PxPre.UIL.Ele Chn_MinSize(this PxPre.UIL.Ele e, float x, float y)
 {
     e.minSize = new Vector2(x, y);
     return(e);
 }
示例#6
0
 public static PxPre.UIL.Ele Chn_MinSize(this PxPre.UIL.Ele e, Vector2 newMinSz)
 {
     e.minSize = newMinSz;
     return(e);
 }
示例#7
0
 public override void Add(Ele child, float proportion, LFlag flags)
 {
     this.Add(child, proportion, flags, "");
 }
示例#8
0
 public abstract bool HasEntry(Ele child);
示例#9
0
 public abstract bool Remove(Ele child);
示例#10
0
 public abstract void Add(Ele child, float proportion, LFlag flags);
示例#11
0
 public override void Add(Ele ele, float proportion, LFlag flags)
 {
     this.entries.Add(
         new PairedLayoutData(ele, proportion, flags));
 }
示例#12
0
 public PairedLayoutData(Ele ele, float p, LFlag s)
 {
     this.ele   = ele;
     this.prop  = p;
     this.style = s;
 }