Short background story: I'm using the canvas thingy to make a startup menu with different pages.
Anyways, for some reason, when I set the canvas after converting into one, the canvas is blank. I asked a friend about this and he said he got that problem too. The only way he got around it was removing some code from the canvas. Problem is, I don't want to remove some code and make everything unorganized and stuff. Is there a way to get around this bug?
Expected: The canvas is drawn exactly how it was coded
Problem: The canvas appears blank when drawn
Code:
Code: Select all
function love.load()
--main variables
flux = require "flux" --flux.to(obj, time, { x = num, y = num})
Quickie = require "Quickie"
TitleFont = love.graphics.newFont("/fonts/FaceYourFears.ttf", 45)
--Canvas
MainMenuCanvas = love.graphics.newCanvas()
HowToPlayCanvas = love.graphics.newCanvas()
CreditsCanvas = love.graphics.newCanvas()
--MainMenu Canvas
love.graphics.setCanvas(MainMenuCanvas)
MainMenuCanvas:clear()
love.graphics.setFont(TitleFont)
love.graphics.setColor(255, 0, 0)
love.graphics.print(_G.GameTitle, (TitleFont:getWidth(_G.GameTitle)/2), 10)
end
function love.update(dt)
--
end
function love.draw()
love.graphics.draw(MainMenuCanvas)
end