SHERLOCK: Don't print bogus hotkey

This commit is contained in:
Vladimir Serbinenko 2023-02-07 11:12:34 +01:00 committed by Eugene Sandulenko
parent 12ed6c83fe
commit a728a5aee1

View File

@ -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);