aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2008-01-09 21:26:38 +0000
committerFilippos Karapetis2008-01-09 21:26:38 +0000
commit29d1749db5496f37dc053ccecba3fc1a7606289d (patch)
tree773dcebe3680ff954a21aff60782ff91a50c5c1f /engines
parent1cb4578d2ff826e4a2d4bddfae169165a96ea5de (diff)
downloadscummvm-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
Diffstat (limited to 'engines')
-rw-r--r--engines/saga/interface.cpp8
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;