deploy: 13d3bbd461
This commit is contained in:
@@ -26,13 +26,13 @@ A scrollbar element that can be attached to other elements to control their scro
|
||||
|Method|Returns|Description|
|
||||
|---|---|---|
|
||||
|[Scrollbar.new](#Scrollbar.new)|Scrollbar|Creates a new Scrollbar instance
|
||||
|[Scrollbar:attach](#Scrollbar:attach)|Scrollbar|
|
||||
|[Scrollbar:init](#Scrollbar:init)|-|
|
||||
|[Scrollbar:mouse_click](#Scrollbar:mouse_click)|-|
|
||||
|[Scrollbar:mouse_drag](#Scrollbar:mouse_drag)|-|
|
||||
|[Scrollbar:mouse_scroll](#Scrollbar:mouse_scroll)|-|
|
||||
|[Scrollbar:render](#Scrollbar:render)|-|
|
||||
|[Scrollbar:updateAttachedElement](#Scrollbar:updateAttachedElement)|-|
|
||||
|[Scrollbar:attach](#Scrollbar:attach)|Scrollbar|Attaches the scrollbar to an element's property
|
||||
|[Scrollbar:init](#Scrollbar:init)|Scrollbar|Initializes the Scrollbar instance
|
||||
|[Scrollbar:mouse_click](#Scrollbar:mouse_click)|boolean|Handles mouse click events
|
||||
|[Scrollbar:mouse_drag](#Scrollbar:mouse_drag)|boolean|Handles mouse drag events
|
||||
|[Scrollbar:mouse_scroll](#Scrollbar:mouse_scroll)|boolean|Handles mouse scroll events
|
||||
|[Scrollbar:render](#Scrollbar:render)|-|Renders the scrollbar
|
||||
|[Scrollbar:updateAttachedElement](#Scrollbar:updateAttachedElement)|Scrollbar|Updates the attached element's property based on the scrollbar value
|
||||
|
||||
## Scrollbar.new()
|
||||
Creates a new Scrollbar instance
|
||||
@@ -55,16 +55,56 @@ Attaches the scrollbar to an element's property
|
||||
### Returns
|
||||
* `Scrollbar` `self` The scrollbar instance
|
||||
|
||||
## Scrollbar:init()
|
||||
## Scrollbar:init(props, basalt)
|
||||
Initializes the Scrollbar instance
|
||||
|
||||
## Scrollbar:mouse_click()
|
||||
### Parameters
|
||||
* `props` `table` The properties to initialize the element with
|
||||
* `basalt` `table` The basalt instance
|
||||
|
||||
## Scrollbar:mouse_drag()
|
||||
### Returns
|
||||
* `Scrollbar` `self` The initialized instance
|
||||
|
||||
## Scrollbar:mouse_scroll()
|
||||
## Scrollbar:mouse_click(button, x, y)
|
||||
Handles mouse click events
|
||||
|
||||
### Parameters
|
||||
* `button` `number` The mouse button clicked
|
||||
* `x` `number` The x position of the click
|
||||
* `y` `number` The y position of the click
|
||||
|
||||
### Returns
|
||||
* `boolean` `Whether` the event was handled
|
||||
|
||||
## Scrollbar:mouse_drag(button, x, y)
|
||||
Handles mouse drag events
|
||||
|
||||
### Parameters
|
||||
* `button` `number` The mouse button being dragged
|
||||
* `x` `number` The x position of the drag
|
||||
* `y` `number` The y position of the drag
|
||||
|
||||
### Returns
|
||||
* `boolean` `Whether` the event was handled
|
||||
|
||||
## Scrollbar:mouse_scroll(direction, x, y)
|
||||
Handles mouse scroll events
|
||||
|
||||
### Parameters
|
||||
* `direction` `number` The scroll direction (1 for up, -1 for down)
|
||||
* `x` `number` The x position of the scroll
|
||||
* `y` `number` The y position of the scroll
|
||||
|
||||
### Returns
|
||||
* `boolean` `Whether` the event was handled
|
||||
|
||||
## Scrollbar:render()
|
||||
Renders the Scrollbar
|
||||
|
||||
## Scrollbar:updateAttachedElement()
|
||||
Updates the attached element's property based on the scrollbar value
|
||||
|
||||
### Returns
|
||||
* `Scrollbar` `self` The scrollbar instance
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user