diff options
Diffstat (limited to 'engines/sherlock/scalpel/scalpel_user_interface.cpp')
-rw-r--r-- | engines/sherlock/scalpel/scalpel_user_interface.cpp | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/engines/sherlock/scalpel/scalpel_user_interface.cpp b/engines/sherlock/scalpel/scalpel_user_interface.cpp index 44189075b1..6ee9577a5d 100644 --- a/engines/sherlock/scalpel/scalpel_user_interface.cpp +++ b/engines/sherlock/scalpel/scalpel_user_interface.cpp @@ -67,8 +67,6 @@ const int INVENTORY_POINTS[8][3] = { const char COMMANDS[13] = "LMTPOCIUGJFS"; const char COMMANDS_3DO[13] = "LMTPOCIUGSFF"; const char INVENTORY_COMMANDS[9] = { "ELUG-+,." }; -const char *const PRESS_KEY_FOR_MORE = "Press any Key for More."; -const char *const PRESS_KEY_TO_CONTINUE = "Press any Key to Continue."; const int UI_OFFSET_3DO = 16; // (320 - 288) / 2 /*----------------------------------------------------------------*/ @@ -1808,6 +1806,7 @@ void ScalpelUserInterface::printObjectDesc(const Common::String &str, bool first ScalpelInventory &inv = *(ScalpelInventory *)_vm->_inventory; ScalpelScreen &screen = *(ScalpelScreen *)_vm->_screen; Talk &talk = *_vm->_talk; + FixedText &fixedText = *_vm->_fixedText; if (str.hasPrefix("_")) { _lookScriptFlag = true; @@ -1938,20 +1937,28 @@ void ScalpelUserInterface::printObjectDesc(const Common::String &str, bool first // Handle display depending on whether all the message was shown if (!endOfStr) { + Common::String fixedText_PressKeyForMore = fixedText.getText(kFixedText_PressKey_ForMore); + Common::String fixedText_PressKeyForMoreHotkey = fixedText.getText(kFixedText_PressKey_ForMoreHotkey); + int fixedText_PressKeyForMoreLen = screen.stringWidth(fixedText_PressKeyForMore); + screen.makeButton(Common::Rect(46, CONTROLS_Y, 272, CONTROLS_Y + 10), - (SHERLOCK_SCREEN_WIDTH - screen.stringWidth(PRESS_KEY_FOR_MORE)) / 2, - PRESS_KEY_FOR_MORE); + (SHERLOCK_SCREEN_WIDTH - fixedText_PressKeyForMoreLen) / 2, + fixedText_PressKeyForMore); screen.gPrint(Common::Point((SHERLOCK_SCREEN_WIDTH - - screen.stringWidth(PRESS_KEY_FOR_MORE)) / 2, CONTROLS_Y), - COMMAND_FOREGROUND, "P"); + fixedText_PressKeyForMoreLen) / 2, CONTROLS_Y), + COMMAND_FOREGROUND, fixedText_PressKeyForMoreHotkey.c_str()); _descStr = msgP; } else { + Common::String fixedText_PressKeyToContinue = fixedText.getText(kFixedText_PressKey_ToContinue); + Common::String fixedText_PressKeyToContinueHotkey = fixedText.getText(kFixedText_PressKey_ToContinueHotkey); + int fixedText_PressKeyToContinueLen = screen.stringWidth(fixedText_PressKeyToContinue); + screen.makeButton(Common::Rect(46, CONTROLS_Y, 272, CONTROLS_Y + 10), - (SHERLOCK_SCREEN_WIDTH - screen.stringWidth(PRESS_KEY_TO_CONTINUE)) / 2, - PRESS_KEY_TO_CONTINUE); + (SHERLOCK_SCREEN_WIDTH - fixedText_PressKeyToContinueLen) / 2, + fixedText_PressKeyToContinue); screen.gPrint(Common::Point((SHERLOCK_SCREEN_WIDTH - - screen.stringWidth(PRESS_KEY_TO_CONTINUE)) / 2, CONTROLS_Y), - COMMAND_FOREGROUND, "P"); + fixedText_PressKeyToContinueLen) / 2, CONTROLS_Y), + COMMAND_FOREGROUND, fixedText_PressKeyToContinueHotkey.c_str()); _descStr = ""; } |