ScrollField
UiElement
Scrollable sub-window element
pos.gui.ScrollField(x: number, y: number, w: number, h: number)
Creates a new scrollable field with given width and height
Type | Name | Description |
---|---|---|
number |
scroll |
Current scroll value |
string |
type |
Override. type is 'ScrollField' |
Type | Name | Description |
---|---|---|
string |
_elements |
Sub UiElement s drawn within the scroll field |
table |
__elementIndex |
Index of last added sub-element |
Return | Name | Description |
---|---|---|
nil |
draw(window: Window) |
Override. Draws the scroll field and sub-elements |
nil |
process(event: table, window: Window) |
Override. Processes mouse_scroll events |
number |
addElement(element: UiElement) |
Add a sub-element to the field, returning element index |
nil |
removeElement(index: number) |
Remove a sub-element by index |