diff options
author | Paul Gilbert | 2015-07-18 21:08:47 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-07-18 21:08:47 -0400 |
commit | 08036cc4891bb212f7abb3c739a935e3dfb6f293 (patch) | |
tree | 721c3ab1e94df330b94bee8650787732df38676e /engines/sherlock | |
parent | 1844f8ca3d6258c8b02402eab877e9ae0a556005 (diff) | |
download | scummvm-rg350-08036cc4891bb212f7abb3c739a935e3dfb6f293.tar.gz scummvm-rg350-08036cc4891bb212f7abb3c739a935e3dfb6f293.tar.bz2 scummvm-rg350-08036cc4891bb212f7abb3c739a935e3dfb6f293.zip |
SHERLOCK: RT: Fix pressing Escape to close inventory windows
Diffstat (limited to 'engines/sherlock')
-rw-r--r-- | engines/sherlock/tattoo/widget_inventory.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/sherlock/tattoo/widget_inventory.cpp b/engines/sherlock/tattoo/widget_inventory.cpp index 8607e875e9..6386ec5d04 100644 --- a/engines/sherlock/tattoo/widget_inventory.cpp +++ b/engines/sherlock/tattoo/widget_inventory.cpp @@ -376,10 +376,14 @@ void WidgetInventoryVerbs::handleEvents() { Common::Rect innerBounds = _bounds; innerBounds.grow(-3); + // Flag is they started pressing outside of the menu + if (events._firstPress && !_bounds.contains(mousePos)) + _outsideMenu = true; + if (events._released || events._rightReleased || ui._keyState.keycode == Common::KEYCODE_ESCAPE) { ui._scrollHighlight = SH_NONE; - if (_outsideMenu && !innerBounds.contains(mousePos)) { + if (_outsideMenu && !innerBounds.contains(mousePos) || ui._keyState.keycode == Common::KEYCODE_ESCAPE) { banishWindow(); _owner->_invVerbMode = 0; } else if (innerBounds.contains(mousePos)) { |