Thanks for developing an animation library that is so easy to use with prerendered 3d assets :-)bartbes wrote:Wow.
Any Key
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Felipe Budinich
- Citizen
- Posts: 67
- Joined: Thu Jul 29, 2010 1:36 pm
Re: Any Key
Re: Any Key
Counting pressed keys fails badly if you use love.keyboard.setKeyRepeat to enable key repeating. You can see what happens when you run this program and hold down various keys for a while.
Code: Select all
love.keyboard.setKeyRepeat(100, 10)
keysdown = 0
function love.keypressed(key, unicode)
keysdown = keysdown + 1
end
function love.keyreleased(key)
keysdown = keysdown - 1
end
function love.draw()
love.graphics.print("You are holding down " .. keysdown .. " keys",
300, 300)
end
Who is online
Users browsing this forum: No registered users and 61 guests