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 EleSeparator AddHorizontalSeparator(float proportion = 0.0f) { EleBaseSizer szr = this.head.GetSizer(); if (szr == null) { return(null); } EleSeparator sep = this.uiFactory.CreateHorizontalSeparator(this.head.rect); szr.Add(sep, proportion, LFlag.GrowHoriz); return(sep); }
public EleSlider AddHorizontalSlider(float proportion, LFlag flags) { EleBaseSizer szr = this.head.GetSizer(); if (szr == null) { return(null); } EleSlider sldr = this.uiFactory.CreateHorizontalSlider(this.head.rect); szr.Add(sldr, proportion, flags); return(sldr); }
public EleText AddText(string text, bool wrap, float proportion, LFlag flags) { EleBaseSizer szr = this.head.GetSizer(); if (szr == null) { return(null); } EleText ret = this.uiFactory.CreateText(this.head.rect, text, wrap); szr.Add(ret, proportion, flags); return(ret); }
public EleGenButton <ty> AddButton <ty>(string text, float proportion, LFlag flags) where ty : UnityEngine.UI.Button { EleBaseSizer szr = this.head.GetSizer(); if (szr == null) { return(null); } EleGenButton <ty> btn = this.uiFactory.CreateButton <ty>(this.head.rect, text); szr.Add(btn, proportion, flags); return(btn); }
public EleGenSlider <ty> AddHorizontalSlider <ty>(float proportion, LFlag flags) where ty : UnityEngine.UI.Slider { EleBaseSizer szr = this.head.GetSizer(); if (szr == null) { return(null); } EleGenSlider <ty> sldr = this.uiFactory.CreateHorizontalSlider <ty>(this.head.rect); szr.Add(sldr, proportion, flags); return(sldr); }
public EleButton AddButton(string text, float proportion, LFlag flags) { EleBaseSizer szr = this.head.GetSizer(); if (szr == null) { return(null); } EleButton btn = this.uiFactory.CreateButton(this.head.rect, text); szr.Add(btn, proportion, flags); return(btn); }
public EleTex AddTexture(Texture texture, float proportion, LFlag flags) { EleBaseSizer szr = this.head.GetSizer(); if (szr == null) { return(null); } EleTex img = this.uiFactory.CreateTex(this.head.rect, texture); szr.Add(img, proportion, flags); return(img); }
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 EleSpace AddSpace(Vector2 sz, float proportion, LFlag flags) { EleBaseSizer szr = this.head.GetSizer(); if (szr == null) { return(null); } EleSpace space = new EleSpace(sz); szr.Add(space, proportion, flags); return(space); }
public EleGenToggle <ty> AddToggle <ty>(string label, float proportion, LFlag flags) where ty : UnityEngine.UI.Toggle { EleBaseSizer szr = this.head.GetSizer(); if (szr == null) { return(null); } EleGenToggle <ty> tog = this.uiFactory.CreateToggle <ty>(this.head.rect, label); szr.Add(tog, proportion, flags); return(tog); }
public EleVertScrollRgn AddVertScrollRect(float proportion, LFlag flags, string name) { EleBaseSizer szr = this.head.GetSizer(); if (szr == null) { return(null); } EleVertScrollRgn srgn = this.uiFactory.CreateVerticalScrollRect(this.head.rect, name); szr.Add(srgn, proportion, flags); return(srgn); }
public EleGenVertScrollRgn <RTy, STy> AddVertScrollRect <RTy, STy>(float proportion, LFlag flags, string name = "") where RTy : UnityEngine.UI.ScrollRect where STy : UnityEngine.UI.Scrollbar { EleBaseSizer szr = this.head.GetSizer(); if (szr == null) { return(null); } EleGenVertScrollRgn <RTy, STy> srgn = this.uiFactory.CreateGenVerticalScrollRect <RTy, STy>(this.head.rect, name); szr.Add(srgn, proportion, flags); return(srgn); }
public ElePropGrid PushPropGrid(int fontSize, float proportion, LFlag flags) { EleBaseSizer szr = this.head.GetSizer(); if (szr == null) { return(null); } ElePropGrid epg = this.uiFactory.CreatePropertyGrid(this.head.rect, fontSize); szr.Add(epg, proportion, flags); this.stack.Push(this.head); this.head = new Entry(this.head.rect, epg); return(epg); }
public EleInput AddInput(string starting, bool multiline, float proportion, LFlag flags) { EleBaseSizer szr = this.head.GetSizer(); if (szr == null) { return(null); } EleInput input = this.uiFactory.CreateInput(this.head.rect, multiline); if (string.IsNullOrEmpty(starting) == false) { input.input.text = starting; } szr.Add(input, proportion, flags); return(input); }
public EleHeader AddHeader(string text) { EleBaseSizer szr = this.head.GetSizer(); if (szr == null) { return(null); } EleHeader header = new EleHeader( this.head.rect, text, this.uiFactory.headerTextAttrib.font, this.uiFactory.headerTextAttrib.color, this.uiFactory.headerTextAttrib.fontSize, this.uiFactory.headerSprite, this.uiFactory.buttonPadding); szr.Add(header, 0.0f, LFlag.GrowHoriz); return(header); }
public EleBaseSizer(EleBaseSizer parent, float proportion, LFlag flags, string name = "") : base(name) { parent.Add(this, proportion, flags); }