Add cornerRadius option to override theme corner radius
This commit is contained in:
parent
5298f31d06
commit
01f7cd88fb
2 changed files with 6 additions and 1 deletions
|
@ -20,8 +20,10 @@ end
|
|||
|
||||
function theme.drawBox(x,y,w,h, opt, colors)
|
||||
local colors = colors or theme.getColorForState(opt)
|
||||
local cornerRadius = opt.cornerRadius or theme.cornerRadius
|
||||
|
||||
love.graphics.setColor(colors.bg)
|
||||
love.graphics.rectangle('fill', x,y, w,h, theme.cornerRadius)
|
||||
love.graphics.rectangle('fill', x,y, w,h, cornerRadius)
|
||||
end
|
||||
|
||||
function theme.getVerticalOffsetForAlign(valign, font, h)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue