This commit is contained in:
NoryiE
2025-02-18 18:14:43 +00:00
parent 572cb98cd3
commit 3aa5c1e97d
13 changed files with 140 additions and 82 deletions

View File

@@ -9,7 +9,8 @@ with support for selection and scrolling.
|nodes|table|{}|The tree structure containing node objects with {text, children} properties
|selectedNode|table?|nil|Currently selected node
|expandedNodes|table|{}|Table of nodes that are currently expanded
|scrollOffset|number|0|Current scroll position
|scrollOffset|number|0|Current vertical scroll position
|horizontalOffset|number|0|Current horizontal scroll position
|nodeColor|color|white|Color of unselected nodes
|selectedColor|color|lightBlue|Background color of selected node
@@ -20,6 +21,7 @@ with support for selection and scrolling.
|[Tree.new](#Tree.new)|Tree|Creates a new Tree instance
|[Tree:collapseNode](#Tree:collapseNode)|Tree|Collapses a node to hide its children
|[Tree:expandNode](#Tree:expandNode)|Tree|Expands a node to show its children
|[Tree:getNodeSize](#Tree:getNodeSize)|-|
|[Tree:init](#Tree:init)|Tree|Initializes the Tree instance
|[Tree:mouse_click](#Tree:mouse_click)|-|
|[Tree:mouse_scroll](#Tree:mouse_scroll)|-|
@@ -57,6 +59,8 @@ Expands a node
### Returns
* `Tree` `self` The Tree instance
## Tree:getNodeSize()
## Tree:init(props, basalt)
Initializes the Tree instance