Files
Basalt/docs/docs1_6/objects/Frame/setTheme.md
SeaSide53 84096eeca5 Updated links on the site not to point to 404. (#92)
* Updated setTheme.md

* Updated 1.6 setTheme.md

---------

Co-authored-by: SeaSide53 <https://github.com/SeaSide53>
2023-06-03 20:19:56 +02:00

23 lines
870 B
Markdown

## setTheme
Sets the default theme, of that frame children objects always try to get the theme of its parent frame, if it does not exist it goes to its parent parent frame, and so on until it reaches the basalt manager's theme - which is stored in theme.lua (Please checkout [theme](https://github.com/Pyroxenium/Basalt/blob/bb1b1beb795e3cf06a84ca79408244bca715961e/Basalt/theme.lua) for how it could look like.
#### Parameters:
1. `table` theme layout look into [theme](https://github.com/Pyroxenium/Basalt/blob/bb1b1beb795e3cf06a84ca79408244bca715961e/Basalt/theme.lua) for a example
#### Returns:
1. `frame` The frame being used
#### Usage:
- Creates a new base frame and adds a new theme which only changes the default color of buttons.
```lua
local myFrame = basalt.createFrame():setTheme({
ButtonBG = colors.yellow,
ButtonText = colors.red,
})
```