ntf transparency

This commit is contained in:
kepler155c@gmail.com
2019-07-10 19:02:46 -06:00
parent 8f17657263
commit 0e1b712adc
4 changed files with 15 additions and 9 deletions

View File

@@ -17,9 +17,12 @@ end
function UI.NftImage:draw()
if self.image then
-- due to blittle, the background and foreground transparent
-- color is the same as the background color
local bg = self:getProperty('backgroundColor')
for y = 1, self.image.height do
for x = 1, #self.image.text[y] do
self:write(x, y, self.image.text[y][x], self.image.bg[y][x], self.image.fg[y][x])
self:write(x, y, self.image.text[y][x], self.image.bg[y][x], self.image.fg[y][x] or bg)
end
end
else