Add ui:treeState*

Kevin Harrison 2018-12-18 14:06:11 -05:00
parent 870385bc63
commit 583922a615

@ -371,6 +371,27 @@ if ui:treePush(...) then
end
```
#### open = ui:treeStatePush('node'/'tab', title)
#### open = ui:treeStatePush('node'/'tab', title, [image](#images))
#### open = ui:treeStatePush('node'/'tab', title, [image](#images), 'collapsed'/'expanded')
Same as [`ui:treePush`](#open--uitreepushnodetab-title), but the 'collapsed'/'expanded' argument sets the current state of the tree instead of just specifying the initial state.
Be sure to call `ui:treeStatePop` if the tree is open.
#### ui:treeStatePop()
Ends an open tree started with `ui:treeStatePush`. Call this at the end of every open treeState.
#### ui:treeState('node'/'tab', title, body)
#### ui:treeState('node'/'tab', title, [image](#images), body)
#### ui:treeState('node'/'tab', title, [image](#images), 'collapsed'/'expanded', body)
Equivalent to:
```lua
if ui:treeStatePush(...) then
body(ui)
ui:treeStatePop()
end
```
### Popups
#### open = ui:popupBegin('dynamic'/'static', title, x, y, width, height, [flags](#flags)...)