Panel shape is how many cells the panel takes in the GUI grid (it is automatically calculated considering the fact that cells inside could be halflings or giants, see CellShape
).
You are not required to specify both sides, just use rows
or cols
helpers to say how many rows or columns you want in the panel and other side will be calculated automatically. Or even use auto
and both sides will be suggested, but this usually doesn't look good. To specify both sides manually, use by
.
auto : PanelShape
Calculate both rows and column numbers automatically, based on the number of cells inside.
rows : Basics.Int -> PanelShape
Specify how many cell rows there should be in the panel, and calculate columns number automatically.
cols : Basics.Int -> PanelShape
Specify how many cell columns there should be in the panel, and calculate rows number automatically.
by : Basics.Int -> Basics.Int -> PanelShape
Specify panel size manually, i.e. how many cells horizontally and how many vertically.
distribute : PanelShape -> Tron.Style.CellShape.CellShape -> List a -> ( Tron.Pages.Pages (List a), SizeF Size.Cells )
Get numeric size of a panel in cells, and a set of pages required, if there are overflows. Floats, since there could be half-cells.
singlePage : PanelShape -> PanelShape
Do not distribute items over pages
manyPages : PanelShape -> PanelShape
Distribute items over pages automatically (when number of columns / rows overflows 3). Default condition.
pagesEnabled : PanelShape -> Basics.Bool
Check if pagination is enabled.
togglePagination : PanelShape -> PanelShape
Turn pagination off or on.
numify : PanelShape -> ( Basics.Int, Basics.Int )
Returns columns and rows to take, and -1 is the value should be auto-calculated.
create : ( Basics.Int, Basics.Int ) -> PanelShape
Create panel shape from its numeric representation. Put -1 for auto calculation.