Code: Select all
love.graphics.draw(bg, 320, 240)
love.graphics.draw(mouseX, 20,20)
love.graphics.draw(mouseY, 20,40)
Code: Select all
love.graphics.draw(bg, 320, 240)
love.graphics.draw(mouseX, 20,20)
love.graphics.draw(mouseY, 20,40)
Code: Select all
function load()
image = love.graphics.newImage("test.png")
font = love.graphics.newFont(love.default_font, 24)
love.graphics.setFont(font)
love.graphics.setColor(255,255,255)
end
function update(dt)
end
function draw()
love.graphics.draw(image, 320, 240)
love.graphics.draw("Test", 10, 50)
love.graphics.draw("Another test", 10, 100)
end
Code: Select all
love.graphics.setColor(255, 255, 255)
love.graphics.draw(bg, 320, 240)
love.graphics.setColor(0, 0, 0)
love.graphics.draw(mouseX, 20,20)
love.graphics.draw(mouseY, 20,40)
Code: Select all
-- create the color
color = love.graphics.newColor( red, green, blue, alpha )
-- and then call setColor
love.graphics.setColor(color)
-- and draw stuff
Code: Select all
love.graphics.setColor(red,green,blue,alpha)
-- and draw whatever you want
Code: Select all
love.graphics.draw("Test", 10, 50)
love.graphics.draw("Another test", 10, 100)
Code: Select all
love.graphics.draw("Test", 10, 50)
love.graphics.setColor(255,0,0)
love.graphics.draw("Another test", 10, 100)
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 2 guests