This commit is contained in:
NoryiE
2025-02-24 22:54:38 +00:00
parent c3f9dfa735
commit 47fef51a0c
21 changed files with 188 additions and 1114 deletions

View File

@@ -14,45 +14,14 @@ This is the dropdown class. It is a visual element that can show a list of selec
|Method|Returns|Description|
|---|---|---|
|[Dropdown.new](#Dropdown.new)|Dropdown|Creates a new Dropdown instance
## Protected Functions
|Method|Returns|Description|
|---|---|---|
|[Dropdown:init](#Dropdown:init)|Dropdown|Initializes the Dropdown instance
|[Dropdown:mouse_click](#Dropdown:mouse_click)|boolean|Handles mouse click events
|[Dropdown:render](#Dropdown:render)|-|Renders the Dropdown
## Dropdown.new()
Creates a new Dropdown instance
### Returns
* `Dropdown` `self` The newly created Dropdown instance
### Usage
```lua
local dropdown = Dropdown.new()
```
## Dropdown:init(props, basalt)
Initializes the Dropdown instance
### Parameters
* `props` `table` The properties to initialize the element with
* `basalt` `table` The basalt instance
### Returns
* `Dropdown` `self` The initialized instance
## Dropdown:mouse_click(button, x, y)
Handles mouse click events
### Parameters
* `button` `number` The button that was clicked
* `x` `number` The x position of the click
* `y` `number` The y position of the click
### Returns
* `boolean` `handled` Whether the event was handled
## Dropdown:render()
Renders the Dropdown