diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-01-23 19:51:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-01-23 19:51:38 +0300 |
commit | 533e703a2c394b9c4a0c0e2d7367dd5cc48c1502 (patch) | |
tree | bc416027f6fb4d221d04c22ca9c15c11674ca45b /src/game.cpp | |
parent | 0d1ecc47f4b30d40474ac9402180f1a690a8eee2 (diff) | |
download | manaplus-533e703a2c394b9c4a0c0e2d7367dd5cc48c1502.tar.gz manaplus-533e703a2c394b9c4a0c0e2d7367dd5cc48c1502.tar.bz2 manaplus-533e703a2c394b9c4a0c0e2d7367dd5cc48c1502.tar.xz manaplus-533e703a2c394b9c4a0c0e2d7367dd5cc48c1502.zip |
Add support for handling event for show/hide on screen keyboard.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/src/game.cpp b/src/game.cpp index fe279868e..7b5413692 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -942,20 +942,28 @@ void Game::handleInput() if (inputManager.handleEvent(event)) return; - if (event.type == SDL_VIDEORESIZE) + switch (event.type) { - // Let the client deal with this one (it'll pass down from there) - Client::resize(event.resize.w, event.resize.h); - } - // Active event - else if (event.type == SDL_ACTIVEEVENT) - { - handleActive(event); - } - // Quit event - else if (event.type == SDL_QUIT) - { - Client::setState(STATE_EXIT); + case SDL_VIDEORESIZE: + // Let the client deal with this one (it'll + // pass down from there) + Client::resize(event.resize.w, event.resize.h); + break; + // Active event + case SDL_ACTIVEEVENT: + handleActive(event); + break; + // Quit event + case SDL_QUIT: + Client::setState(STATE_EXIT); + break; +#ifdef ANDROID + case SDL_KEYBOARDSHOW: + Client::updateScreenKeyboard(event.user.code); + break; +#endif + default: + break; } BLOCK_END("Game::handleInput 2") } // End while |