libnds
|
NDS button and touchscreen input support. More...
Functions | |
uint32 | keysCurrent (void) |
Obtains the current keypad state. Call this function to get keypad state without affecting state of other key functions (keysUp keysHeld etc...) | |
uint32 | keysDown (void) |
Obtains the current keypad pressed state. | |
uint32 | keysDownRepeat (void) |
Obtains the current keypad pressed or repeating state. | |
uint32 | keysHeld (void) |
Obtains the current keypad held state. | |
void | keysSetRepeat (u8 setDelay, u8 setRepeat) |
Sets the key repeat parameters. More... | |
uint32 | keysUp (void) |
Obtains the current keypad released state. | |
void | scanKeys (void) |
Obtains the current keypad state. Call this function once per main loop in order to use the keypad functions. | |
void | touchRead (touchPosition *data) |
Obtains the current touchpad state. More... | |
NDS button and touchscreen input support.
The state of the keypad must be read from hardware into memory using scanKeys() whenever you want an updated input state. After reading, call one of the associated "keys" functions to see what event was triggered. These events are computed as the difference between the current and previous key state you read. It's generally a good idea to scan keys frequently to insure your application's input system is responsive.
After reading the key state, you will be given an integer representing which keys are in the requested state, to mask of specific buttons, use the key masks described in nds/input.h .
Sets the key repeat parameters.
setDelay | Number of scanKeys calls before keys start to repeat. |
setRepeat | Number of scanKeys calls before keys repeat. |
void touchRead | ( | touchPosition * | data | ) |
Obtains the current touchpad state.
data | a touchPosition ptr which will be filled by the function. |