diff --git a/Documentation.md b/Documentation.md index ab198aa..4a8e226 100644 --- a/Documentation.md +++ b/Documentation.md @@ -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)...)