Code: Select all
function suit:draw()
self:exitFrame()
local oldColor = {love.graphics.getColor()}
local oldBGColor = {love.graphics.getBackgroundColor()}
local oldFont = love.graphics.getFont()
for i = 1,self.draw_queue.n do
self.draw_queue[i]()
end
love.graphics.setColor(oldColor)
love.graphics.setBackgroundColor(oldBGColor)
love.graphics.setFont(oldFont)
self.draw_queue.n = 0
self:enterFrame()
end