mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 01:15:58 +00:00
SHERLOCK: RT: Fix pressing Escape to close inventory windows
This commit is contained in:
parent
1844f8ca3d
commit
08036cc489
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user