aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/journal.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-05-19 09:35:53 -0400
committerPaul Gilbert2015-05-19 09:35:53 -0400
commit6f9693102f99843501822f27431d839777fb43d5 (patch)
tree52fe45394376d8faea84b5e8ef6beac7e9296686 /engines/sherlock/journal.cpp
parent033241eb434ff4916c140885a6cda84a593406d5 (diff)
downloadscummvm-rg350-6f9693102f99843501822f27431d839777fb43d5.tar.gz
scummvm-rg350-6f9693102f99843501822f27431d839777fb43d5.tar.bz2
scummvm-rg350-6f9693102f99843501822f27431d839777fb43d5.zip
SHERLOCK: Further minor cleanups
Diffstat (limited to 'engines/sherlock/journal.cpp')
-rw-r--r--engines/sherlock/journal.cpp7
1 files changed, 4 insertions, 3 deletions
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);