aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
authorFilippos Karapetis2008-04-10 08:27:09 +0000
committerFilippos Karapetis2008-04-10 08:27:09 +0000
commit71f6a7e8553f722926ad9277ca870b1f95b482b3 (patch)
treea28c41a1edaaeee747e9e1c3d20d498978e77bc5 /engines/agi
parent3d407b81f8221e229136f4e12cb6bb9b9ba2d6e2 (diff)
downloadscummvm-rg350-71f6a7e8553f722926ad9277ca870b1f95b482b3.tar.gz
scummvm-rg350-71f6a7e8553f722926ad9277ca870b1f95b482b3.tar.bz2
scummvm-rg350-71f6a7e8553f722926ad9277ca870b1f95b482b3.zip
Allow the predictive dialog to be shown when ego cannot be moved (i.e. when _game.playerControl is 0), since in those cases it is possible to enter text in the input area. Should fix bugs #1935844 - "PQ1: Predictive Text does not load" and #1936374 - "LSL1: No predictive input at age verification page"
svn-id: r31462
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/agi.cpp2
-rw-r--r--engines/agi/keyboard.cpp21
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) {