love.system

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
dbltnk
Prole
Posts: 21
Joined: Thu Dec 10, 2009 8:23 pm

love.system

Post by dbltnk »

So - if love.system has beed removed, what doI have to call to get those functions working again?

Code: Select all

function love.keypressed(key)
	--exit the game when ESC is pressed
	if key == love.key_escape then
		love.system.exit()
	end
	--restart the game when R is presses
	if key == love.key_r then
		love.system.restart()
	end	
end
User avatar
bmelts
Party member
Posts: 380
Joined: Fri Jan 30, 2009 3:16 am
Location: Wiscönsin
Contact:

Re: love.system

Post by bmelts »

love.system.exit() is now love.event.push('q'). There is no equivalent for love.system.restart(); that functionality has been removed.
User avatar
dbltnk
Prole
Posts: 21
Joined: Thu Dec 10, 2009 8:23 pm

Re: love.system

Post by dbltnk »

Thanks for the info, anjo. Looks like there are quite some nasty surprises in the 0.6.0-changelog. The "image size must be a power of 2" thing also had me spinning some time until I found out where the error was. =D
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: love.system

Post by bartbes »

There is a function posted on the forums which can pad the images for you.
User avatar
bmelts
Party member
Posts: 380
Joined: Fri Jan 30, 2009 3:16 am
Location: Wiscönsin
Contact:

Re: love.system

Post by bmelts »

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 4 guests