form.getFieldSlots¶
since 1.1.0
Return a table of coordinates for fields in a line.
Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
line |
FormLine | yes | the line where the field should be added |
fields |
nil or table | yes | table of specs for each field in the line (either a string, or a width). The available space will be splitted into all cells where specs have a zero-width |
Returns¶
rects (table of Rect): the coordinates
Examples¶
From the official Ethos documentation
form.getFieldSlots(line, nil)
form.getFieldSlots(line, {100, 0, "slot3"})
Used in¶
Real-world usage¶
Called 79 times across 5 open-source Ethos Lua projects. A few short excerpts: