system.registerTheme¶
since 26.1.0
Register a Lua Theme.
Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
params |
table | yes | see the fields below |
Fields of params:
key(string): unique key, with 7 chars maxname(string or function): theme namefocusStyle(string, default="invert"): focus style ("outline", "invert", or "color")borderWidth(number, default=2): widgets border widthtoolbarBackground(bitmap): top toolbar background bitmaptoolbarLogo(bitmap): top toolbar logocolors(table): theme colorsroundButtons(boolean, optional): whether to use round buttons or not
Returns¶
Nothing.
Examples¶
From the official Ethos documentation
local function init()
system.registerTheme({
key="dark2",
name="Dark alternative"
focusStyle="outline",
borderWidth=3,
roundButtons=false,
})
end
return {init=init}