示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
 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);
 }