font1 = love.graphics.newFont('assets/font1.ttf', 150)
font2 = love.graphics.newFont('assets/font2.ttf', 50)
function love.load()
backgroundImg = love.graphics.newImage('assets/background.png')
title = true
end
function love.update()
end
function love.draw()
love.graphics.draw(backgroundImg, 0, 0)
if title == true then
love.graphics.setFont(font1)
love.graphics.print('Dodge', 100, 20)
love.graphics.setFont(font2)
love.graphics.print('Play', 100, 300)
end
end
btw, you can simply write "if title then" instead of "if title == true then" (the same goes with false values: "if not title then" equals to "if title == false then")...
Last edited by arampl on Tue Jul 07, 2015 2:59 pm, edited 1 time in total.
Also, another quick suggestion: Don't put setnewfont in any other function but love.load . It's very taxing on your computer and will cause your game to crash. I learned that the hard way... >_<'
fleshwhiskey wrote:Also, another quick suggestion: Don't put setnewfont in any other function but love.load . It's very taxing on your computer and will cause your game to crash. I learned that the hard way... >_<'
fleshwhiskey wrote:Also, another quick suggestion: Don't put setnewfont in any other function but love.load . It's very taxing on your computer and will cause your game to crash. I learned that the hard way... >_<'
Do you mean setFont() or newFont() ?
he means newFont
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
fleshwhiskey wrote:Also, another quick suggestion: Don't put setnewfont in any other function but love.load . It's very taxing on your computer and will cause your game to crash. I learned that the hard way... >_<'