This commit is contained in:
NoryiE
2025-10-29 17:18:10 +00:00
parent 00a9ce5632
commit c9bdfc6a69
22 changed files with 175 additions and 175 deletions

View File

@@ -43,11 +43,11 @@ Adds an item to the Collection
* `Collection` `self` The Collection instance
### Usage
```lua run
```lua
Collection:addItem("New Item")
```
```lua run
```lua
Collection:addItem({text="Item", callback=function() end})
```
@@ -62,7 +62,7 @@ Removes an item from the Collection
* `Collection` `self` The Collection instance
### Usage
```lua run
```lua
Collection:removeItem(1)
```
@@ -74,7 +74,7 @@ Clears all items from the Collection
* `Collection` `self` The Collection instance
### Usage
```lua run
```lua
Collection:clear()
```
@@ -86,7 +86,7 @@ Gets the currently selected items
* `table` `selected` Collection of selected items
### Usage
```lua run
```lua
local selected = Collection:getSelectedItems()
```
@@ -105,7 +105,7 @@ Gets the index of the first selected item
* `index` `The` index of the first selected item, or nil if none selected
### Usage
```lua run
```lua
local index = Collection:getSelectedIndex()
```
@@ -134,6 +134,6 @@ Registers a callback for the select event
* `Collection` `self` The Collection instance
### Usage
```lua run
```lua
Collection:onSelect(function(index, item) print("Selected item:", index, item) end)
```