From 91648d68e09dbd09b6b296135a3c685cad4c459f Mon Sep 17 00:00:00 2001 From: Neil Millstone Date: Mon, 2 Jul 2007 22:45:21 +0000 Subject: Adding hooks for word completion interface on DS port svn-id: r27871 --- engines/agi/keyboard.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp index 17865e1f3a..3acc81ddff 100644 --- a/engines/agi/keyboard.cpp +++ b/engines/agi/keyboard.cpp @@ -29,6 +29,9 @@ #include "agi/graphics.h" #include "agi/keyboard.h" #include "agi/menu.h" +#ifdef __DS__ +#include "wordcompletion.h" +#endif namespace Agi { @@ -308,6 +311,9 @@ void AgiEngine::handleKeys(int key) { debugC(3, kDebugLevelInput, "clear lines"); clearLines(l, l + 1, bg); flushLines(l, l + 1); +#ifdef __DS__ + DS::findWordCompletions((char *) _game.inputBuffer); +#endif break; case KEY_ESCAPE: @@ -324,6 +330,10 @@ void AgiEngine::handleKeys(int key) { _game.inputBuffer[--_game.cursorPos] = 0; /* Print cursor */ _gfx->printCharacter(_game.cursorPos + 1, l, _game.cursorChar, fg, bg); + +#ifdef __DS__ + DS::findWordCompletions((char *) _game.inputBuffer); +#endif break; default: /* Ignore invalid keystrokes */ @@ -337,6 +347,10 @@ void AgiEngine::handleKeys(int key) { _game.inputBuffer[_game.cursorPos++] = key; _game.inputBuffer[_game.cursorPos] = 0; +#ifdef __DS__ + DS::findWordCompletions((char *) _game.inputBuffer); +#endif + /* echo */ _gfx->printCharacter(_game.cursorPos, l, _game.inputBuffer[_game.cursorPos - 1], fg, bg); -- cgit v1.2.3