ScrollViewComponent
extends BaseComponent implements IPointerEnterHandler, IPointerExitHandler, IEnabled
Description
The ScrollViewComponent is based on uGUI's ScrollView. It offers a scrollable area in both vertical and horizontal directions and can be configured to have a variety of scrolling behaviours.
Examples
Simple UI Builder
float spacing = 20f;
UI.ScrollView(ScrollViewDirection.Vertical, spacing, builder => {
builder.Add(
UI.Text("Top");
UI.Image(_logoSprite);
UI.Text("Lower");
);
})
.ContentPadding(PaddingSide.All, 10)
.Size(_width, _height)
.Parent(canvas);