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 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 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 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 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 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 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 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 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 EleGridSizer AddGridSizer(int cols, float proportion, LFlag flags) { EleBaseSizer szr = this.head.GetSizer(); EleGridSizer ret; if (szr == null) { ret = this.uiFactory.GridSizer(this.head.rect, cols); } else { ret = this.uiFactory.GridSizer(szr, cols, proportion, flags); } return(ret); }
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 EleBoxSizer AddHorizSizer(float proportion, LFlag flags) { EleBaseSizer szr = this.head.GetSizer(); EleBoxSizer ret; if (szr == null) { ret = this.uiFactory.HorizontalSizer(this.head.rect); } else { ret = this.uiFactory.HorizontalSizer(szr, proportion, flags); } return(ret); }
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 EleBoxSizer HorizontalSizer(EleBaseSizer parent, float proportion, LFlag flags) { EleBoxSizer bs = new EleBoxSizer(parent, Direction.Horiz, proportion, flags); return(bs); }
public EleBaseSizer(EleBaseSizer parent, float proportion, LFlag flags, string name = "") : base(name) { parent.Add(this, proportion, flags); }
public UILStack(Factory factory, EleBaseRect rect, EleBaseSizer sizer) { this.uiFactory = factory; this.head = new Entry(rect, sizer); }
public void SetSizer(EleBaseSizer sz) { this.sizer = sz; }
public Entry(EleBaseRect rect) { this.rect = rect; this.sizer = null; }
public Entry(EleBaseRect rect, EleBaseSizer sizer) { this.rect = rect; this.sizer = sizer; }
public EleBoxSizer VerticalSizer(EleBaseSizer parent, float proportion, LFlag flags) { EleBoxSizer bs = new EleBoxSizer(parent, Direction.Vert, proportion, flags); return(bs); }
public EleBoxSizer(EleBaseSizer parent, Direction direction, float proportion, LFlag flags, string name = "") : base(parent, proportion, flags, name) { this.direction = direction; }
public EleGridSizer GridSizer(EleBaseSizer parent, int cols, float proportion, LFlag flags) { EleGridSizer gs = new EleGridSizer(parent, cols, proportion, flags); return(gs); }
public EleGridSizer(EleBaseSizer parent, int col, float proportion, LFlag flags, string name = "") : base(parent, proportion, flags, name) { this.columns = col; }