From 6f9693102f99843501822f27431d839777fb43d5 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 19 May 2015 09:35:53 -0400 Subject: SHERLOCK: Further minor cleanups --- engines/sherlock/journal.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'engines/sherlock/journal.cpp') diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp index 7afa60d396..f3754db95f 100644 --- a/engines/sherlock/journal.cpp +++ b/engines/sherlock/journal.cpp @@ -1114,13 +1114,14 @@ int Journal::getSearchString(bool printError) { xp -= screen.charWidth(name.lastChar()); screen.vgaBar(Common::Rect(xp, yp, xp + 8, yp + 9), INV_FOREGROUND); name.deleteLastChar(); - } - - if (keyState.keycode == Common::KEYCODE_RETURN) { + + } else if (keyState.keycode == Common::KEYCODE_RETURN) { done = 1; + } else if (keyState.keycode == Common::KEYCODE_ESCAPE) { screen.vgaBar(Common::Rect(xp, yp, xp + 8, yp + 9), BUTTON_MIDDLE); done = -1; + } else if (keyState.ascii >= ' ' && keyState.ascii <= 'z' && keyState.keycode != Common::KEYCODE_AT && name.size() < JOURNAL_SEACRH_MAX_CHARS && (xp + screen.charWidth(keyState.ascii)) < JOURNAL_SEARCH_RIGHT) { char ch = toupper(keyState.ascii); -- cgit v1.2.3