libnds
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Fields
Keyboard Struct Reference

describes a keyboard. More...

#include <keyboard.h>

Data Fields

int background
 
int grid_height
 
int grid_width
 
int keyboardOnSub
 
int mapBase
 
KeyMapmappings [4]
 array of 4 keymap pointers, one for every keyboard state.
 
int offset_x
 
int offset_y
 
KeyChangeCallback OnKeyPressed
 
KeyChangeCallback OnKeyReleased
 
const u16palette
 
u32 paletteLen
 
u32 scrollSpeed
 
int shifted
 
KeyboardState state
 
int tileBase
 
u32 tileLen
 
int tileOffset
 
const u16tiles
 
int visible
 

Detailed Description

describes a keyboard.

Field Documentation

int Keyboard::background

Background number to use, after init() this contains the background ID

int Keyboard::grid_height

the grid height, this size will be used to translate y coordinate of touch to y coordinate in keymap

int Keyboard::grid_width

the grid width, this size will be used to translate x coordinate of touch to x coordinate in keymap

int Keyboard::keyboardOnSub

boolean to determine if keyboard is on sub screen or main

int Keyboard::mapBase

map base to be used by the keyboard

int Keyboard::offset_x

x offset of the map, can be used to center a custom keyboard

int Keyboard::offset_y

y offset of the map, can be used to center a custom keyboard

KeyChangeCallback Keyboard::OnKeyPressed

will be called on key press

KeyChangeCallback Keyboard::OnKeyReleased

will be called on key release

const u16* Keyboard::palette

pointer to the palette

u32 Keyboard::paletteLen

length in bytes of the palette data

u32 Keyboard::scrollSpeed

keyboard scroll speed on hide and show in pixels per frame (must be positive and 0 == instant on)

int Keyboard::shifted

true if shifted

KeyboardState Keyboard::state

the state of the keyboard

int Keyboard::tileBase

tile base to be used by keyboard graphics

u32 Keyboard::tileLen

length in bytes of graphics data

int Keyboard::tileOffset

tile offset (in bytes) to load graphics (map must be preadjusted)

const u16* Keyboard::tiles

pointer to graphics tiles, cannot exceed 44KB with default base

int Keyboard::visible

true if visible


The documentation for this struct was generated from the following file: