diff options
-rw-r--r-- | engines/sherlock/journal.cpp | 2 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_journal.cpp | 20 |
2 files changed, 13 insertions, 9 deletions
diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp index 334cc05abf..e442a3c903 100644 --- a/engines/sherlock/journal.cpp +++ b/engines/sherlock/journal.cpp @@ -250,7 +250,7 @@ bool Journal::drawJournal(int direction, int howFar) { // Print out the found keyword Common::String lineMatch(matchP, matchP + _find.size()); - byte fgColor = IS_SERRATED_SCALPEL ? (byte)Scalpel::INV_FOREGROUND : (byte)Tattoo::INV_FOREGROUND; + byte fgColor = IS_SERRATED_SCALPEL ? (byte)Scalpel::INV_FOREGROUND : (byte)Tattoo::PEN_HIGHLIGHT_COLOR; screen.gPrint(Common::Point(JOURNAL_LEFT_X + width, yp), fgColor, "%s", lineMatch.c_str()); width += screen.stringWidth(lineMatch.c_str()); diff --git a/engines/sherlock/tattoo/tattoo_journal.cpp b/engines/sherlock/tattoo/tattoo_journal.cpp index 3b78f9e9da..41de82871e 100644 --- a/engines/sherlock/tattoo/tattoo_journal.cpp +++ b/engines/sherlock/tattoo/tattoo_journal.cpp @@ -353,8 +353,8 @@ void TattooJournal::handleButtons() { _savedSub = _sub; _savedPage = _page; - if (drawJournal(dir + 2, 1000 * LINES_PER_PAGE) == 0) - { + bool drawResult = drawJournal(dir + 2, 1000 * LINES_PER_PAGE); + if (!drawResult) { _index = _savedIndex; _sub = _savedSub; _page = _savedPage; @@ -362,12 +362,13 @@ void TattooJournal::handleButtons() { drawFrame(); drawJournal(0, 0); notFound = true; - } else { - break; } highlightJournalControls(false); screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT); + + if (drawResult) + break; } else { break; } @@ -754,6 +755,7 @@ int TattooJournal::getFindName(bool printError) { int cursorX, cursorY; bool blinkFlag = false; int blinkCountdown = 1; + enum SearchButtons { SB_CANCEL = 0, SB_BACKWARDS = 1, SB_FORWARDS = 2 }; Common::Rect r(JOURNAL_BAR_WIDTH, (screen.fontHeight() + 4) * 2 + 9); r.moveTo((SHERLOCK_SCREEN_WIDTH - r.width()) / 2, (SHERLOCK_SCREEN_HEIGHT - r.height()) / 2); @@ -769,7 +771,8 @@ int TattooJournal::getFindName(bool printError) { r.right - 3, cursorY + screen.fontHeight())); if (printError) { - screen.gPrint(Common::Point(0, cursorY), INFO_TOP, "%s", FIXED(TextNotFound)); + screen.gPrint(Common::Point(r.left + (r.width() - screen.stringWidth(FIXED(TextNotFound))) / 2, cursorY), + INFO_TOP, "%s", FIXED(TextNotFound)); } else { // If there was a name already entered, copy it to name and display it if (!_find.empty()) { @@ -905,13 +908,13 @@ int TattooJournal::getFindName(bool printError) { if (events._released || events._rightReleased) { switch (_selector) { - case JH_CLOSE: + case SB_CANCEL: done = -1; break; - case JH_SEARCH: + case SB_BACKWARDS: done = 2; break; - case JH_PRINT: + case SB_FORWARDS: done = 1; break; default: @@ -921,6 +924,7 @@ int TattooJournal::getFindName(bool printError) { } while (!done); if (done != -1) { + // Forwards or backwards search, so save the entered name _find = name; result = done; } else { |