Page 1 of 1
How do I make a frame?
Posted: Sat Dec 29, 2012 12:56 pm
by micolord
How do I make a frame with title on it? I'm a little confuse about 'love.graphic' because the only way I know how to make one is the print thingy in the wiki but is there any other way except print?? Please help I'm so new.
Re: How do I make a frame?
Posted: Sat Dec 29, 2012 3:20 pm
by Robin
What do you want to do exactly? Could you draw it out in paint?
Re: How do I make a frame?
Posted: Sat Dec 29, 2012 3:47 pm
by micolord
You got me all wrong
What I want is to create a panel or frame or whatever that is called here in Lua, where I put all the objects inside it (e.g images).
Re: How do I make a frame?
Posted: Sat Dec 29, 2012 9:45 pm
by Nixola
There's
love.graphics.newImage, that should only be called once; it allows ou to load an image that you can draw using
love.graphics.draw.
Code: Select all
function love.load()
myImage = love.graphics.newImage("some_image.png")
end
function love.draw()
love.graphics.draw(myImage, love.mouse.getX(), love.mouse.getY()) -- it draws the loaded image where the mouse is
end
You can find
love.graphics.rectangle,
love.graphics.polygon,
love.graphics.circle;
love.graphics.setColor lets you choose their color, and there's more (
love.graphics)