Add cornerRadius option to override theme corner radius

This commit is contained in:
Andrew Minnich 2016-03-05 16:20:43 -05:00
parent 5298f31d06
commit 01f7cd88fb
2 changed files with 6 additions and 1 deletions

View file

@ -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)