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); }
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); }
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); }
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); }
public static PxPre.UIL.Ele Chn_MinSize(this PxPre.UIL.Ele e, float x, float y) { e.minSize = new Vector2(x, y); return(e); }
public static PxPre.UIL.Ele Chn_MinSize(this PxPre.UIL.Ele e, Vector2 newMinSz) { e.minSize = newMinSz; return(e); }
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);
public abstract void Add(Ele child, float proportion, LFlag flags);
public override void Add(Ele ele, float proportion, LFlag flags) { this.entries.Add( new PairedLayoutData(ele, proportion, flags)); }
public PairedLayoutData(Ele ele, float p, LFlag s) { this.ele = ele; this.prop = p; this.style = s; }