UIScrollView Class
Scrollable container for UI components that exceed visible area.
public class UIScrollView : Brine2D.UI.IUIComponent
Inheritance System.Object → UIScrollView
Implements IUIComponent
| Properties | |
|---|---|
| BackgroundColor | Background color. |
| BorderColor | Border color. |
| ContentHeight | Total content height (can be larger than Size.Y for scrolling). |
| ContentWidth | Total content width (can be larger than Size.X for horizontal scrolling). |
| ScrollbarColor | Scrollbar color. |
| ScrollbarHoverColor | Scrollbar hover color. |
| ScrollbarWidth | Width of the scrollbar. |
| ScrollOffset | Current scroll offset (0 = top/left). |
| ScrollSpeed | Scroll speed multiplier for mouse wheel. |
| ShowHorizontalScrollbar | Whether to show horizontal scrollbar. |
| ShowVerticalScrollbar | Whether to show vertical scrollbar. |
| Methods | |
|---|---|
| AddChild(IUIComponent) | Adds a child component to the scroll view. Child positions are relative to the scroll view's content area. |
| EndScrollbarDrag() | Called by UICanvas when scrollbar drag ends. |
| GetChildren() | Gets all child components. |
| HandleScroll(float) | Called by UICanvas to handle scroll wheel input. |
| RemoveChild(IUIComponent) | Removes a child component. |
| ScrollToChild(IUIComponent) | Scrolls to make the specified child visible. |
| StartScrollbarDrag(Vector2, bool) | Called by UICanvas when scrollbar is clicked. |
| UpdateScrollbarDrag(Vector2) | Called by UICanvas during scrollbar drag. |