system.registerLayout¶
since 1.5.8
Register a Lua Layout.
Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
params |
table | yes | see the fields below |
Fields of params:
key(string): unique key, with 7 chars maxwidgets(table of rect, optional): layout widgets slotstrims(table of rect, optional): layout trims slotspots(table of rect, optional): layout pots slots
Returns¶
Nothing.
Examples¶
From the official Ethos documentation
local function init()
system.registerLayout({key="foo", widgets={
{x=10, y=10, w=100, h=100},
{x=120, y=120, w=100, h=100}}
})
end
return {init=init}
Used in¶
Real-world usage¶
Called 1 times across 1 open-source Ethos Lua project. A few short excerpts: