diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agi/agi.cpp | 2 | ||||
-rw-r--r-- | engines/agi/keyboard.cpp | 21 |
2 files changed, 12 insertions, 11 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index 0a5ef71f0e..58d6eba8cf 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -69,7 +69,7 @@ void AgiEngine::processEvents() { case Common::EVENT_PREDICTIVE_DIALOG: if (_predictiveDialogRunning) break; - if (_game.playerControl && predictiveDialog()) { + if (predictiveDialog()) { if (_game.inputMode == INPUT_NORMAL) { strcpy((char *)_game.inputBuffer, _predictiveResult); handleKeys(KEY_ENTER); diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp index c4532941d6..aa917b6e90 100644 --- a/engines/agi/keyboard.cpp +++ b/engines/agi/keyboard.cpp @@ -135,6 +135,17 @@ int AgiEngine::handleController(int key) { } } + // Show predictive dialog if the user clicks on input area + if (key == BUTTON_LEFT && + (int)g_mouse.y >= _game.lineUserInput * CHAR_LINES && + (int)g_mouse.y <= (_game.lineUserInput + 1) * CHAR_LINES) { + if (predictiveDialog()) { + strcpy((char *)_game.inputBuffer, _predictiveResult); + handleKeys(KEY_ENTER); + } + return true; + } + if (_game.playerControl) { int d = 0; @@ -167,16 +178,6 @@ int AgiEngine::handleController(int key) { } } - if (key == BUTTON_LEFT && - (int)g_mouse.y >= _game.lineUserInput * CHAR_LINES && - (int)g_mouse.y <= (_game.lineUserInput + 1) * CHAR_LINES) { - if (predictiveDialog()) { - strcpy((char *)_game.inputBuffer, _predictiveResult); - handleKeys(KEY_ENTER); - } - return true; - } - if (!(getFeatures() & GF_AGIMOUSE)) { /* Handle mouse button events */ if (key == BUTTON_LEFT) { |