-
Notifications
You must be signed in to change notification settings - Fork 27
Using the theme system
Gustavo Lara edited this page Jan 31, 2017
·
16 revisions
GÖÖi uses a style object with some attributes, here's the default one (in component.lua):
component.style = {
bgColor = {12, 183, 242, 170}, -- LOVE blue
fgColor = {255, 255, 255, 255}, -- Foreground color
tooltipFont = love.graphics.newFont(love.window.toPixels(11)), -- tooltips are smaller than the main font
radius = 3, -- radius for the outer shapes of components
innerRadius = 3, -- For the inner ones
showBorder = false, -- border for components
borderColor = {12, 183, 242, 255},
borderWidth = 2, -- in pixels
borderStyle = "rough", -- or "smooth"
font = love.graphics.newFont(love.window.toPixels(13)),
mode3d = false, -- gives that subtle gradient on the given color
glass = false -- for a glass effect (horizon reflection)
}
use:
gooi.setStyle(style)
to apply a style following the conventions above, all the attributes are optional.
Important notes:
- Set the style before creating any element
- For styling of an individual component see Generic component