-
Notifications
You must be signed in to change notification settings - Fork 27
Using the theme system
tavuntu edited this page Jan 10, 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(10), -- 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
font = love.graphics.newFont(12),
mode3d = false, -- gives that subtle gradient on the given color
glass = false -- for a glass effect (horizon reflection)
}
use:
gooi.setStyle(style)
to apply any style, all the attributes are optional.
Important notes:
- Set the style before creating any element
- For styling of an individual component see Generic component