diff options
author | Paul Gilbert | 2015-07-18 21:37:07 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-07-18 21:37:07 -0400 |
commit | 46c8a5c335b184b7c908dc323926ccb53dd576ed (patch) | |
tree | ade2ca186ad9e8bcbb0fffb5eef37886cc716ff9 /engines | |
parent | 08036cc4891bb212f7abb3c739a935e3dfb6f293 (diff) | |
download | scummvm-rg350-46c8a5c335b184b7c908dc323926ccb53dd576ed.tar.gz scummvm-rg350-46c8a5c335b184b7c908dc323926ccb53dd576ed.tar.bz2 scummvm-rg350-46c8a5c335b184b7c908dc323926ccb53dd576ed.zip |
SHERLOCK: RT: Implement Escape key handling in waitForMore
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sherlock/talk.cpp | 11 | ||||
-rw-r--r-- | engines/sherlock/tattoo/widget_inventory.cpp | 6 |
2 files changed, 11 insertions, 6 deletions
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp index 4430022a85..dc546b4b3a 100644 --- a/engines/sherlock/talk.cpp +++ b/engines/sherlock/talk.cpp @@ -925,7 +925,16 @@ int Talk::waitForMore(int delay) { if (events.kbHit()) { Common::KeyState keyState = events.getKey(); - if (Common::isPrint(keyState.ascii)) + if (keyState.keycode == Common::KEYCODE_ESCAPE) { + if (IS_ROSE_TATTOO && static_cast<Tattoo::TattooEngine *>(_vm)->_runningProlog) { + // Skip out of the introduction + _vm->setFlags(-76); + _vm->setFlags(396); + scene._goToScene = 1; + } + break; + + } else if (Common::isPrint(keyState.ascii)) key2 = keyState.keycode; } diff --git a/engines/sherlock/tattoo/widget_inventory.cpp b/engines/sherlock/tattoo/widget_inventory.cpp index 6386ec5d04..c6ff39fd55 100644 --- a/engines/sherlock/tattoo/widget_inventory.cpp +++ b/engines/sherlock/tattoo/widget_inventory.cpp @@ -382,9 +382,9 @@ void WidgetInventoryVerbs::handleEvents() { if (events._released || events._rightReleased || ui._keyState.keycode == Common::KEYCODE_ESCAPE) { ui._scrollHighlight = SH_NONE; + banishWindow(); if (_outsideMenu && !innerBounds.contains(mousePos) || ui._keyState.keycode == Common::KEYCODE_ESCAPE) { - banishWindow(); _owner->_invVerbMode = 0; } else if (innerBounds.contains(mousePos)) { _outsideMenu = false; @@ -397,11 +397,9 @@ void WidgetInventoryVerbs::handleEvents() { if (doHangman) { // Close the entire Inventory and return to Standard Mode - banishWindow(); _owner->_invVerbMode = 0; _owner->_tooltipWidget.banishWindow(); - banishWindow(); inv.freeInv(); events.clearEvents(); @@ -418,8 +416,6 @@ void WidgetInventoryVerbs::handleEvents() { ui._lookPos = mousePos; ui.printObjectDesc(inv[_owner->_invSelect]._examine, true); } else { - // Clear the window - banishWindow(); _owner->_invVerbMode = 3; ui._oldBgFound = -1; |