properly direct pred. dialog's output, when started thru the event mechanism

svn-id: r27022
This commit is contained in:
Kostas Nakos 2007-05-30 19:49:33 +00:00
parent 45b721d3cc
commit 346b12d701

View File

@ -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: