diff options
author | Torbjörn Andersson | 2015-04-06 10:42:16 +0200 |
---|---|---|
committer | Torbjörn Andersson | 2015-04-06 10:42:16 +0200 |
commit | c8ac76b22bfd676bb72a850a141730022d6d476c (patch) | |
tree | 411e3d5c8707a42015b5738fc87b7ca86c6c3ed1 /engines | |
parent | f3251b5bb65bbd4ecee7a0700e1f876987cc7644 (diff) | |
download | scummvm-rg350-c8ac76b22bfd676bb72a850a141730022d6d476c.tar.gz scummvm-rg350-c8ac76b22bfd676bb72a850a141730022d6d476c.tar.bz2 scummvm-rg350-c8ac76b22bfd676bb72a850a141730022d6d476c.zip |
MADS: Show first character of the Rex Nebular copy protection word
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/nebular/dialogs_nebular.cpp | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp index 731e7e960d..10715797ed 100644 --- a/engines/mads/nebular/dialogs_nebular.cpp +++ b/engines/mads/nebular/dialogs_nebular.cpp @@ -438,24 +438,31 @@ void CopyProtectionDialog::show() { _vm->_screen.copyRectToScreen(inputArea); _vm->_screen.updateScreen(); + bool firstTime = true; + while (!_vm->shouldQuit()) { - while (!_vm->shouldQuit() && !_vm->_events->isKeyPressed()) { - _vm->_events->delay(1); - } + if (!firstTime) { + while (!_vm->shouldQuit() && !_vm->_events->isKeyPressed()) { + _vm->_events->delay(1); + } - if (_vm->shouldQuit()) - break; + if (_vm->shouldQuit()) + break; - curKey = _vm->_events->getKey(); - - if (curKey.keycode == Common::KEYCODE_RETURN || curKey.keycode == Common::KEYCODE_KP_ENTER) - break; - else if (curKey.keycode == Common::KEYCODE_BACKSPACE) - _textInput.deleteLastChar(); - else if (_textInput.size() < 14) - _textInput += curKey.ascii; + curKey = _vm->_events->getKey(); + + if (curKey.keycode == Common::KEYCODE_RETURN || curKey.keycode == Common::KEYCODE_KP_ENTER) + break; + else if (curKey.keycode == Common::KEYCODE_BACKSPACE) + _textInput.deleteLastChar(); + else if (_textInput.size() < 14) + _textInput += curKey.ascii; - _vm->_events->_pendingKeys.clear(); + _vm->_events->_pendingKeys.clear(); + } else { + firstTime = false; + _textInput = _hogEntry._word[0]; + } _vm->_screen.copyFrom(origInput, Common::Rect(0, 0, inputArea.width(), inputArea.height()), Common::Point(inputArea.left, inputArea.top)); _font->writeString(&_vm->_screen, _textInput, |