I tried:
Code: Select all
love.graphics.setColourMode("replace")
Code: Select all
love.graphics.setColourMode("replace")
Code: Select all
love.graphics.setColorMode("replace") -- images will not be affected by current color
function love.draw()
love.graphics.setColorMode("modulate") -- image WIILL be affected
love.graphics.setColor(0,255,0)
love.graphics.print("hello, i'm Green!", 10,10)
love.graphics.setColorMode("replace") --not sure if that is needed
love.graphics.print("not Green, yeaaah!", 30 , 30)
end
Code: Select all
love.graphics.setColor(255, 255, 255)
Code: Select all
function Lib.draw() -- Draws all the objects.
for k, obj in pairs(Objects) do
if obj.objtype == "Label" then
love.graphics.setColor(obj.red, obj.green, obj.blue)
love.graphics.setFont(love.graphics.newFont(obj.fontsize))
love.graphics.print(obj.words, obj.xpos, obj.ypos)
elseif obj.objtype == "Button" then
love.graphics.setColor(obj.red, obj.green, obj.blue)
love.graphics.rectangle(obj.status, obj.xpos, obj.ypos, obj.height, obj.width)
elseif obj.objtype == "Image" then
love.graphics.draw(obj.pic, obj.x, obj.y)
end
end
end
Users browsing this forum: Ahrefs [Bot] and 12 guests