GrAPiC
Graphics for Algo/Prog in C/C++
◆
isKeyPressed()
int grapic::isKeyPressed
(
int
key
)
inline
return the number of time the key 'key' has been pressed since the last call to this function.
if
(
isKeyPressed
(SDLK_LEFT)) { ... }
// test if the left arrow is pressed
if
(
isKeyPressed
(SDLK_LEFT)) { ... }
// if the left arrow is pressed then do ...
if
(
isKeyPressed
(SDLK_a)) { ... }
// if the key 'a' is pressed then do ...
if
(
isKeyPressed
(
'a'
)) { ... }
// if the key 'a' is pressed then do ...
grapic::isKeyPressed
int isKeyPressed(int key)
return the number of time the key 'key' has been pressed since the last call to this function.
Definition:
Grapic.h:453
grapic
Generated by
1.9.1