TreeLayout
Package: Libraries.Interface.Layouts · Inherits from: Libraries.Language.Object, Libraries.Interface.Layouts.Layout
Actions
GetItemsHeight(Libraries.Containers.Array<Libraries.Interface.Item2D> children, number scale)
This action returns how tall a tree item's children are, as this layout places them: each child's height (with the items open under it) and the gaps between them. TreeItem:GetTreeHeight uses it, so a layout that places children differently, such as side by side, says its own height.
Parameters
childrenLibraries.Containers.Array<Libraries.Interface.Item2D>: The children of a tree item's panelscalenumber: The panel's interface scale, for the gaps
Returns
number: The height, in pixels
GetPadding()
Returns
number
IsTopAligned()
This action returns how tall a tree item's children are, as this layout places them: each child's height (with the items open under it) and the gaps between them. TreeItem:GetTreeHeight uses it, so a layout that places children differently, such as side by side, says its own height.
Returns
boolean: The height, in pixels
Layout(Libraries.Interface.Controls.Control container, Libraries.Containers.Array<Libraries.Interface.Item2D> items, number containerWidth, number containerHeight)
Parameters
containerLibraries.Interface.Controls.ControlitemsLibraries.Containers.Array<Libraries.Interface.Item2D>containerWidthnumbercontainerHeightnumber
SetPadding(number value)
Parameters
valuenumber
SetTopAligned(boolean topAligned)
Correct the positions of the elements, which will otherwise appear below the newly heightened tree panel.
Parameters
topAlignedboolean