diff options
author | Vladimir Menshakov | 2010-03-23 08:33:51 +0000 |
---|---|---|
committer | Vladimir Menshakov | 2010-03-23 08:33:51 +0000 |
commit | 9571c817c7b7f30ed33ff5d4a07d80b8cea4f8c1 (patch) | |
tree | 607db661c38ba38cc39b74d0949a07d834a984a9 /engines/teenagent | |
parent | 9f53578fd2dcdd72c3bea2a4a7d92f342ae6a40f (diff) | |
download | scummvm-rg350-9571c817c7b7f30ed33ff5d4a07d80b8cea4f8c1.tar.gz scummvm-rg350-9571c817c7b7f30ed33ff5d4a07d80b8cea4f8c1.tar.bz2 scummvm-rg350-9571c817c7b7f30ed33ff5d4a07d80b8cea4f8c1.zip |
do not close inventory if mouse moves up. better mouseless experience.
svn-id: r48367
Diffstat (limited to 'engines/teenagent')
-rw-r--r-- | engines/teenagent/inventory.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/teenagent/inventory.cpp b/engines/teenagent/inventory.cpp index 24297912ca..5a08883a53 100644 --- a/engines/teenagent/inventory.cpp +++ b/engines/teenagent/inventory.cpp @@ -158,19 +158,21 @@ bool Inventory::processEvent(const Common::Event &event) { switch (event.type) { case Common::EVENT_MOUSEMOVE: - mouse = event.mouse; if (!_active) { if (event.mouse.y < 5) activate(true); + mouse = event.mouse; return false; } - if (event.mouse.x < 17 || event.mouse.x >= 303 || event.mouse.y >= 153) { + if (event.mouse.x < 17 || event.mouse.x >= 303 || (event.mouse.y - mouse.y > 0 && event.mouse.y >= 153)) { activate(false); + mouse = event.mouse; return false; } + mouse = event.mouse; hovered_obj = NULL; for (int i = 0; i < 24; ++i) { |