I coded the tutorial 3 and I believe that it didn't do all that I suppose that it do.
and....
Nice to meet you all.
Tutorial 3 is ok?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Tutorial 3 is ok?
What was your final source code? It worked for me. And welcome to the Löve Club, by the way .
Help us help you: attach a .love.
Re: Tutorial 3 is ok?
code
main.lua
and I saw i little error in the tutorial "Using Input" ->http://love2d.org/documentation?page=tutorial&id=005 it need a " in the first function draw.
main.lua
outputfunction load()
font = love.graphics.newFont (love.default_font, 14)
love.graphics.setFont (font)
end
function draw()
love.graphics.draw("A really long sentence whitch will probably be broken into many ieces by my love.", 500,100,250, love.align_right)
love.graphics.draw("This text will be centered no matter what.\n(and you LOVE it)", 0, 400,800, love.align_center)
love.graphics.draw("Aligned to the left, yer very much so",100, 500,150)
end
and I saw i little error in the tutorial "Using Input" ->http://love2d.org/documentation?page=tutorial&id=005 it need a " in the first function draw.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Tutorial 3 is ok?
Code: Select all
-- Tutorial: Fonts and Text
-- Adding font objects and drawing some text.
function load()
defaultfont = love.graphics.newFont(love.default_font, 14)
fontfile = love.graphics.newFont("LOTR.TTF", 14)
imagefont = love.graphics.newImageFont("imagefont.png", " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,!?-+/():;%&`'*#=[]\"")
love.graphics.setFont(defaultfont) -- change the font in here to see the changes
love.graphics.setColor(255,255,255,255) -- we need to set a color as well
num = 15
end
function draw()
love.graphics.draw("This is some awesome text", 100, 100) -- drawn at the position (100,100)
love.graphics.draw(num, 100, 150)
love.graphics.draw("This is the first line\nThis is the second one.\n(and a third)\n\nfifth", 100, 200)
love.graphics.drawf("A really long sentence which will probably be broken into many pieces by my love.", 500, 100, 250, love.align_right)
love.graphics.drawf("This text will be centered no matter what!\n(and you LOVE it)", 0, 400, 800, love.align_center)
love.graphics.drawf("Aligned to the left, yes very much so.", 100, 500, 150)
end
Help us help you: attach a .love.
Re: Tutorial 3 is ok?
Thanks. with drawf() works properly
Re: Tutorial 3 is ok?
Did somebody forget to update the tutorial? Yes.
Am I going to fix it? No.
Am I going to fix it? No.
Now posting IN STEREO (where available)
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 12 guests