public UIPivot(float slotsWidth) { this.slotsWidth = slotsWidth; slideContainer = new UIContainer(); affSlide = new AffectorF2(slideContainer.Position).SetFunc(new ExpTransFunction(2, 6)); InternAdd(slideContainer); affSlide.End.Add(affSlide_End); }
public override UIContainer Add(UIElement elem) { UIContainer container = new UIContainer(); container.SetWidth(slotsWidth).SetX(slideContainer.Count() * slotsWidth); slideContainer.Add(container); container.Add(elem); this.maxIndex++; return(this); }
public override UIContainer Add(params UIElement[] elems) { foreach (UIElement elem in elems) { UIContainer container = new UIContainer(); container.SetWidth(slotsWidth).SetX(slideContainer.Count() * slotsWidth); slideContainer.Add(container); container.Add(elem); this.maxIndex++; } return(this); }