Example #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);
 }
Example #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);
 }
Example #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);
        }
Example #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);
        }
Example #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);
 }
Example #6
0
 public static PxPre.UIL.Ele Chn_MinSize(this PxPre.UIL.Ele e, Vector2 newMinSz)
 {
     e.minSize = newMinSz;
     return(e);
 }
Example #7
0
 public override void Add(Ele child, float proportion, LFlag flags)
 {
     this.Add(child, proportion, flags, "");
 }
 public abstract bool HasEntry(Ele child);
 public abstract bool Remove(Ele child);
Example #10
0
 public abstract void Add(Ele child, float proportion, LFlag flags);
Example #11
0
 public override void Add(Ele ele, float proportion, LFlag flags)
 {
     this.entries.Add(
         new PairedLayoutData(ele, proportion, flags));
 }
Example #12
0
 public PairedLayoutData(Ele ele, float p, LFlag s)
 {
     this.ele   = ele;
     this.prop  = p;
     this.style = s;
 }