From a728a5aee1893ea7f55308a74cc1305b4ef36300 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Tue, 7 Feb 2023 11:12:34 +0100 Subject: [PATCH] SHERLOCK: Don't print bogus hotkey --- engines/sherlock/scalpel/scalpel_screen.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/sherlock/scalpel/scalpel_screen.cpp b/engines/sherlock/scalpel/scalpel_screen.cpp index c05deade992..a5f51941a4f 100644 --- a/engines/sherlock/scalpel/scalpel_screen.cpp +++ b/engines/sherlock/scalpel/scalpel_screen.cpp @@ -96,11 +96,13 @@ void ScalpelScreen::buttonPrint(const Common::Point &pt, uint color, bool slamIt if (slamIt) { print(Common::Point(xStart, pt.y + 1), COMMAND_FOREGROUND, "%s", buttonText.c_str() + skipTextOffset); - print(Common::Point(xStart + prefixOffsetX, pt.y + 1), COMMAND_HIGHLIGHTED, "%c", hotkey); + if (textContainsHotkey) + print(Common::Point(xStart + prefixOffsetX, pt.y + 1), COMMAND_HIGHLIGHTED, "%c", hotkey); } else { gPrint(Common::Point(xStart, pt.y), COMMAND_FOREGROUND, "%s", buttonText.c_str() + skipTextOffset); - gPrint(Common::Point(xStart + prefixOffsetX, pt.y), COMMAND_HIGHLIGHTED, "%c", hotkey); + if (textContainsHotkey) + gPrint(Common::Point(xStart + prefixOffsetX, pt.y), COMMAND_HIGHLIGHTED, "%c", hotkey); } } else if (slamIt) { print(Common::Point(xStart, pt.y + 1), color, "%s", buttonText.c_str() + skipTextOffset);