public EleToggle CreateToggle(string label) { if (this.head.rect == null) { return(null); } EleToggle tog = this.uiFactory.CreateToggle(this.head.rect, label); return(tog); }
public EleToggle AddToggle(string label, float proportion, LFlag flags) { EleBaseSizer szr = this.head.GetSizer(); if (szr == null) { return(null); } EleToggle tog = this.uiFactory.CreateToggle(this.head.rect, label); szr.Add(tog, proportion, flags); return(tog); }
public EleToggle CreateToggle(EleBaseRect parent, string label, Vector2 size, string name = "") { size.x = Mathf.Max(this.checkboxWidth, size.x); size.y = Mathf.Max(this.checkboxMinHeight, size.y); EleToggle etog = new EleToggle( parent, string.IsNullOrEmpty(label) ? null : this.textTextAttrib, label, this.checkboxStyle, this.checkboxWidth, this.checkboxToggleSprite, this.checkboxType, this.checkboxPadding, size, this.checkboxContentSeperationWidth); this.onCreateCheckbox?.Invoke(etog.toggle); return(etog); }