Synchronized the on-screen keyboard state with whether we are accepting text input.

The functions to show/hide/toggle the on-screen keyboard have been folded into the text input state.
Calling SDL_StartTextInput() will automatically show the on-screen keyboard if it's available.
Calling SDL_StopTextInput() will automatically hide the on-screen keyboard if it's available.
There is a new API function SDL_IsTextInputActive() which will return whether text input is currently active.
Text input is disabled by default, you must call SDL_StartTextInput() when you are ready to accept text input.
SDL_HasScreenKeyboardSupport() no longer needs to be passed a window.
The iPhone-specific on-screen keyboard functions have been removed.
This commit is contained in:
Sam Lantinga 2012-11-04 21:53:28 -08:00
parent 2228e50b28
commit e7b4458d8b
18 changed files with 97 additions and 219 deletions

View file

@ -166,9 +166,7 @@ main(int argc, char *argv[])
SDL_GL_CreateContext(window);
#endif
if (SDL_HasScreenKeyboardSupport(window)) {
SDL_ShowScreenKeyboard(window);
}
SDL_StartTextInput();
/* Watch keystrokes */
done = 0;