Won't display text and image
Posted: Fri Jul 01, 2022 2:26 am
I've been trying to get this to work for so long, and I almost did but for some reason every time I run it only the picture shows up and not the text. When I put the code for the image in a comment, the text shows up, but when I un-comment the image code the text disappears and only the image shows. here's my code:
function love.draw()
love.graphics.print("Welcome to the game!", 0, 0)
end
local dog = love.graphics.newImage('dog.png')
function love.load()
love.graphics.setDefaultFilter('nearest', 'nearest')
end
function love.draw()
love.graphics.draw(dog, 300, 400)
end
function love.draw()
love.graphics.print("Welcome to the game!", 0, 0)
end
local dog = love.graphics.newImage('dog.png')
function love.load()
love.graphics.setDefaultFilter('nearest', 'nearest')
end
function love.draw()
love.graphics.draw(dog, 300, 400)
end