aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
authorKostas Nakos2007-05-30 19:49:33 +0000
committerKostas Nakos2007-05-30 19:49:33 +0000
commit346b12d701849e8987ddee930e44c67f8e824e26 (patch)
tree7e69dc1e70eac8ff8617d9ae649d4e18a7615eae /engines/agi
parent45b721d3cc47c6682edbf3e8cf30c31ca72c5a3c (diff)
downloadscummvm-rg350-346b12d701849e8987ddee930e44c67f8e824e26.tar.gz
scummvm-rg350-346b12d701849e8987ddee930e44c67f8e824e26.tar.bz2
scummvm-rg350-346b12d701849e8987ddee930e44c67f8e824e26.zip
properly direct pred. dialog's output, when started thru the event mechanism
svn-id: r27022
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/agi.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 76d46a67a0..58fcbda580 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -68,9 +68,16 @@ void AgiEngine::processEvents() {
_system->quit();
break;
case Common::EVENT_PREDICTIVE_DIALOG:
- if (predictiveDialog()) {
- strcpy((char *)_game.inputBuffer, _predictiveResult);
- handleKeys(KEY_ENTER);
+ if (_game.playerControl && predictiveDialog()) {
+ if (_game.inputMode == INPUT_NORMAL) {
+ strcpy((char *)_game.inputBuffer, _predictiveResult);
+ handleKeys(KEY_ENTER);
+ } else if (_game.inputMode == INPUT_GETSTRING) {
+ strcpy(_game.strings[_stringdata.str], _predictiveResult);
+ newInputMode(INPUT_NORMAL);
+ _gfx->printCharacter(_stringdata.x + strlen(_game.strings[_stringdata.str]) + 1,
+ _stringdata.y, ' ', _game.colorFg, _game.colorBg);
+ }
}
break;
case Common::EVENT_LBUTTONDOWN: