public Carousel(string name, Vector2 position, OABB shape, UIElementOrientation orientation, int visibleOptions, bool wrap, float offset, float fallOff) : base(name, position, shape) { this.ElementOrientation = orientation; this.VisibleOptions = visibleOptions; this.Wrap = wrap; this.fallOff = fallOff; elements = new List <UIElement>(); selectedElement = -1; switch (orientation) { default: case UIElementOrientation.LeftRight: this.offset = new Vector2(offset, 0); break; case UIElementOrientation.TopDown: this.offset = new Vector2(0, offset); break; } }
public CarouselContainer(string name, string caption, Vector2 position, OABB shape, int capacity, UIElementOrientation orientation, int visibleOptions, bool wrap, float offset) : base(name, caption, position, shape) { this.ElementOrientation = orientation; this.Contents = new List <ContainerItem>(); this.Capacity = capacity; this.VisibleOptions = visibleOptions; this.Wrap = wrap; this.selectedContent = -1; this.hovering = null; switch (orientation) { default: case UIElementOrientation.LeftRight: this.offset = new Vector2(offset, 0); break; case UIElementOrientation.TopDown: this.offset = new Vector2(0, offset); break; } }