API reference Obsidian.API.Client.Screens
ScrollBar class
A vertical scroll bar, like the creative inventory's: a handle the player drags along the bar's height, or moves with the mouse wheel over the bar or its ScrollBar.WheelArea, to pick a row. The screen shows what the row says, for example as an ItemGrid's ItemGrid.FirstRow. 12 pixels wide unless sized otherwise.
public sealed class ScrollBar : Widget
In Obsidian.API.Client.
Constructors
public ScrollBar();Properties
Handle
public string Handle { get; set; }The handle's GUI sprite, with a _disabled variant drawn while the bar can't move: vanilla's creative inventory's by default.
HandleHeight
public int HandleHeight { get; set; }The handle's height, in pixels; it's as wide as the bar.
MaxRow
public int MaxRow { get; set; }The last row the bar scrolls to: how many rows there are beyond those shown at once. At 0 the bar can't move and its handle is drawn disabled.
Row
public int Row { get; set; }The row scrolled to, from 0 to ScrollBar.MaxRow. Setting it doesn't raise ScrollBar.Scrolled.
WheelArea
public Widget WheelArea { get; set; }Another widget the mouse wheel scrolls the bar over, like the grid it scrolls; null for only the bar.
Events
Scrolled
public event Action<int> Scrolled;Raised with the new row when the player scrolls.