Table of Contents | ||
|
||
DoInput | ||
Purpose Takes the current keystroke and passes it to the input function |
||
Protoype void CtextMngr::DoInput (SDL_keysym sym_keystroke) |
||
Parameters
|
||
Description When an Input Text object is selected, this function takes the key pressed (represented as an SDL keysym) and appends that character onto the input text string. The function first checks a flag to make sure that an Input Text object has been actiavted with EnableInput(). Then it also updates the position of the input cursor and resizes the hotspot for future selection.
|
||
Use CTextMngr text; SDL_event event; // in SDL event loop case SDL_KEYDOWN: { text.DoInput(event.key.keysym); } break; |
||
|
||
|