|
libnds
|
Describes a keyboard. More...
#include <keyboard.h>
Data Fields | |
| int | background |
| Background ID used by the keyboard. Initialized by keyboardInit() | |
| u8 | grid_height |
| Grid height, used to translate y coordinate to keymap. | |
| u8 | grid_width |
| Grid width, used to translate x coordinate to keymap. | |
| bool | keyboardOnSub |
| True if the keyboard is on the sub screen. Initialized by keyboardInit(). | |
| u8 | mapBase |
| Map base to be used by the keyboard. Initialized by keyboardInit(). | |
| const KeyMap * | mappings [4] |
| Array of 4 keymap pointers, one for every KeyboardState. | |
| s16 | offset_x |
| Current X offset of the map. Initialized by keyboardInit() | |
| s16 | offset_y |
| Current Y offset of the map. Initialized by keyboardInit() | |
| KeyChangeCallback | OnKeyPressed |
| Will be called on key press. | |
| KeyChangeCallback | OnKeyReleased |
| Will be called on key release. | |
| const void * | palette |
| Pointer to the palette. | |
| u32 | paletteLen |
| Length in bytes of the palette data. | |
| u8 | scrollSpeed |
| Keyboard scroll speed on hide and show in pixels per frame. | |
| bool | shifted |
| If shifted, true (e.g. if you want the first char to be uppercase). | |
| KeyboardState | state |
| The state of the keyboard. | |
| u8 | tileBase |
| Tile base to be used by keyboard graphics. Initialized by keyboardInit(). | |
| u32 | tileLen |
| Length in bytes of graphics data. | |
| int | tileOffset |
| Tile offset (in bytes) to load graphics. | |
| const void * | tiles |
| Pointer to graphics tiles, cannot exceed 44KB with default base. | |
| bool | visible |
| If visible, true. Initialized by keyboardInit(). | |
Describes a keyboard.
| u8 Keyboard::scrollSpeed |
Keyboard scroll speed on hide and show in pixels per frame.
Must be positive. 0 means that the keyboard is shown/hidden right away.
| int Keyboard::tileOffset |
Tile offset (in bytes) to load graphics.
The map must be preadjusted for this offset. TODO: Make this work.