aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Menshakov2010-03-23 08:33:51 +0000
committerVladimir Menshakov2010-03-23 08:33:51 +0000
commit9571c817c7b7f30ed33ff5d4a07d80b8cea4f8c1 (patch)
tree607db661c38ba38cc39b74d0949a07d834a984a9
parent9f53578fd2dcdd72c3bea2a4a7d92f342ae6a40f (diff)
downloadscummvm-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
-rw-r--r--engines/teenagent/inventory.cpp6
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) {