Closing window?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Closing window?
Is it possible to close the window by pressing a key, i've been looking on the doc for about 1 hour and i haven't found anything to close the window without using your mouse.
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: Closing window?
Code: Select all
love.event.push('q') --Exits LOVE
- Taehl
- Dreaming in associative arrays
- Posts: 1025
- Joined: Mon Jan 11, 2010 5:07 am
- Location: CA, USA
- Contact:
Re: Closing window?
Here you go. This code will close the window when you press the Esc button.
Code: Select all
function love.keypressed( key )
if key == "escape" then
love.event.push("q")
end
end
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Who is online
Users browsing this forum: Bing [Bot] and 2 guests