diff options
author | Filippos Karapetis | 2008-01-09 21:26:38 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-01-09 21:26:38 +0000 |
commit | 29d1749db5496f37dc053ccecba3fc1a7606289d (patch) | |
tree | 773dcebe3680ff954a21aff60782ff91a50c5c1f | |
parent | 1cb4578d2ff826e4a2d4bddfae169165a96ea5de (diff) | |
download | scummvm-rg350-29d1749db5496f37dc053ccecba3fc1a7606289d.tar.gz scummvm-rg350-29d1749db5496f37dc053ccecba3fc1a7606289d.tar.bz2 scummvm-rg350-29d1749db5496f37dc053ccecba3fc1a7606289d.zip |
Added handling of home/end keys in input dialogs and properly filtered out non-alphanumeric keys
svn-id: r30358
-rw-r--r-- | engines/saga/interface.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp index 8ff5d2d4ef..b13bf94650 100644 --- a/engines/saga/interface.cpp +++ b/engines/saga/interface.cpp @@ -1189,8 +1189,14 @@ bool Interface::processTextInput(Common::KeyState keystate) { _textInputPos++; } break; + case Common::KEYCODE_HOME: + _textInputPos = 1; + break; + case Common::KEYCODE_END: + _textInputPos = _textInputStringLength + 1; + break; default: - if (isalnum(keystate.ascii) || (keystate.ascii == ' ') || + if (keystate.ascii <= 255 && isalnum(keystate.ascii) || (keystate.ascii == ' ') || (keystate.ascii == '-') || (keystate.ascii == '_')) { if (_textInputStringLength < save_title_size - 1) { ch[0] = keystate.ascii; |