better support for custom color themes in button and label
This commit is contained in:
parent
45a4b65053
commit
07a1731419
2 changed files with 2 additions and 0 deletions
|
@ -6,6 +6,7 @@ return function(core, text, ...)
|
||||||
local opt, x,y,w,h = core.getOptionsAndSize(...)
|
local opt, x,y,w,h = core.getOptionsAndSize(...)
|
||||||
opt.id = opt.id or text
|
opt.id = opt.id or text
|
||||||
opt.font = opt.font or love.graphics.getFont()
|
opt.font = opt.font or love.graphics.getFont()
|
||||||
|
opt.color = opt.color or core.theme.color
|
||||||
|
|
||||||
w = w or opt.font:getWidth(text) + 4
|
w = w or opt.font:getWidth(text) + 4
|
||||||
h = h or opt.font:getHeight() + 4
|
h = h or opt.font:getHeight() + 4
|
||||||
|
|
|
@ -6,6 +6,7 @@ return function(core, text, ...)
|
||||||
local opt, x,y,w,h = core.getOptionsAndSize(...)
|
local opt, x,y,w,h = core.getOptionsAndSize(...)
|
||||||
opt.id = opt.id or text
|
opt.id = opt.id or text
|
||||||
opt.font = opt.font or love.graphics.getFont()
|
opt.font = opt.font or love.graphics.getFont()
|
||||||
|
opt.color = opt.color or core.theme.color
|
||||||
|
|
||||||
w = w or opt.font:getWidth(text) + 4
|
w = w or opt.font:getWidth(text) + 4
|
||||||
h = h or opt.font:getHeight() + 4
|
h = h or opt.font:getHeight() + 4
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue