use color alpha in button backgrounds

This commit is contained in:
Kartik K. Agaram 2023-10-16 22:59:04 -07:00
parent 4b3f359526
commit f61976c61a
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ function button(State, name, params)
if State.button_handlers == nil then
State.button_handlers = {}
end
love.graphics.setColor(params.bg.r, params.bg.g, params.bg.b)
love.graphics.setColor(params.bg.r, params.bg.g, params.bg.b, params.bg.a)
love.graphics.rectangle('fill', params.x,params.y, params.w,params.h, 5,5)
if params.icon then params.icon(params) end
table.insert(State.button_handlers, params)