How do I make a frame?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
micolord
Prole
Posts: 4
Joined: Sat Dec 29, 2012 11:14 am

How do I make a frame?

Post 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.
What's the point of existence? If I would be given a wish, I'd wish I never existed.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: How do I make a frame?

Post by Robin »

What do you want to do exactly? Could you draw it out in paint?
Help us help you: attach a .love.
micolord
Prole
Posts: 4
Joined: Sat Dec 29, 2012 11:14 am

Re: How do I make a frame?

Post 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).
What's the point of existence? If I would be given a wish, I'd wish I never existed.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: How do I make a frame?

Post 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)
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 5 guests