ScrollView
Optional feature
ScrollView is part of UI Controls. A build includes it only when a scene, prefab or script uses it — see Feature cropping.
From a script
ts
import { ScrollViewComponent } from "mmpx";
const scrollView = this.entity.TryGetComponent(ScrollViewComponent);Full API: ScrollViewComponent.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
Contentcontent | Entity | — | The entity that scrolls |
Horizontalhorizontal | boolean | true | |
Verticalvertical | boolean | true | |
Inertiainertia | boolean | true | |
Brakebrake | number (0 … 1) | 0.5 | |
Offset XoffsetX | number | 0 | |
Offset YoffsetY | number | 0 | |
Elasticelastic | boolean | true | Pulls past the edges and springs back |
Bounce DurationbounceDuration | number (0.05 … ∞) (s) | 0.3 | |
Wheel SpeedwheelSpeed | number (0 … ∞) | 1 | Mouse wheel scroll speed (0 = off) |
Scrollbars
| Field | Type | Default | Description |
|---|---|---|---|
HorizontalhorizontalScrollbar | Entity | — | |
VerticalverticalScrollbar | Entity | — |