Hi,
how can I handle a key which is press and hold on?
Now I must press a key repeatly to move my sprite.
thanks
Hi,
how can I handle a key which is press and hold on?
Now I must press a key repeatly to move my sprite.
thanks
Please take a look at
http://www.libsdl.org/cgi/cvsweb.cgi/SDL12/docs/html/guideinputkeyboard.html
section “Game-type Input”.
Basically, when you’ve got the event.type SDL_KEYDOWN you store this state
in a variable and move your sprite until you get the event.type SDL_KEYUP.
Gru?
WalterAm Dienstag, 11. November 2003 12:00 schrieb Alessandro Ardolino:
Hi,
how can I handle a key which is press and hold on?Now I must press a key repeatly to move my sprite.
thanks