From ad24968f56a4dc0d36d6d21c096b1b302558f03d Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 20 Apr 2010 15:28:19 +0000 Subject: SCI: menu - handle right aligned "=" as actual text not as tag marker, also handle "=" as being a supported shortcut key svn-id: r48747 --- engines/sci/graphics/menu.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp index ed5a034250..46df316932 100644 --- a/engines/sci/graphics/menu.cpp +++ b/engines/sci/graphics/menu.cpp @@ -99,6 +99,10 @@ void GfxMenu::kernelAddEntry(Common::String title, Common::String content, reg_t while ((curPos < contentSize) && (content[curPos] != ':')) { switch (content[curPos]) { case '=': // Set tag + // Special case for normal animation speed - they use right aligned "=" for that one, so we ignore it + // as being recognized as tag marker + if (rightAlignedPos == curPos - 1) + break; if (tagPos) error("multiple tag markers within one menu-item"); tagPos = curPos; @@ -221,11 +225,13 @@ void GfxMenu::kernelAddEntry(Common::String title, Common::String content, reg_t // Remove ending space, if there is one. Strangely sometimes there are lone spaces at the end in some games if (itemEntry->textRightAligned.hasSuffix(" ")) itemEntry->textRightAligned.deleteLastChar(); - // - and + are used sometimes for volume control + // - and + are used sometimes for volume control/animation speed, = sometimes for animation speed if (itemEntry->textRightAligned == "-") { itemEntry->keyPress = '-'; } else if (itemEntry->textRightAligned == "+") { itemEntry->keyPress = '+'; + } else if (itemEntry->textRightAligned == "=") { + itemEntry->keyPress = '='; } } -- cgit v1.2.3