From 07a1731419872dde74d1e1208c761210037289be Mon Sep 17 00:00:00 2001 From: len0rd Date: Tue, 12 Aug 2025 12:54:44 -0400 Subject: [PATCH] better support for custom color themes in button and label --- button.lua | 1 + label.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/button.lua b/button.lua index 7f5d365..f365654 100644 --- a/button.lua +++ b/button.lua @@ -6,6 +6,7 @@ return function(core, text, ...) local opt, x,y,w,h = core.getOptionsAndSize(...) opt.id = opt.id or text opt.font = opt.font or love.graphics.getFont() + opt.color = opt.color or core.theme.color w = w or opt.font:getWidth(text) + 4 h = h or opt.font:getHeight() + 4 diff --git a/label.lua b/label.lua index 9f45a86..79834b8 100644 --- a/label.lua +++ b/label.lua @@ -6,6 +6,7 @@ return function(core, text, ...) local opt, x,y,w,h = core.getOptionsAndSize(...) opt.id = opt.id or text opt.font = opt.font or love.graphics.getFont() + opt.color = opt.color or core.theme.color w = w or opt.font:getWidth(text) + 4 h = h or opt.font:getHeight() + 4