diff options
author | Eugene Sandulenko | 2011-01-04 21:45:09 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2011-01-04 21:45:09 +0000 |
commit | 11780744c296e997178791755204363d08c6f68a (patch) | |
tree | 422ebda93bf53df67d1ff2123a8b9843f33597fb | |
parent | bee912ff54422ded754a36bd47c9d70ae15c765b (diff) | |
download | scummvm-rg350-11780744c296e997178791755204363d08c6f68a.tar.gz scummvm-rg350-11780744c296e997178791755204363d08c6f68a.tar.bz2 scummvm-rg350-11780744c296e997178791755204363d08c6f68a.zip |
HUGO: Proper implementation for menu closing when clicked outside of it
svn-id: r55121
-rw-r--r-- | engines/hugo/menu.cpp | 10 | ||||
-rw-r--r-- | engines/hugo/menu.h | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/engines/hugo/menu.cpp b/engines/hugo/menu.cpp index 31d874995a..2bb3ec2c91 100644 --- a/engines/hugo/menu.cpp +++ b/engines/hugo/menu.cpp @@ -222,9 +222,11 @@ void TopMenu::handleCommand(GUI::CommandSender *sender, uint32 command, uint32 d } } -//void TopMenu::handleMouseUp(int x, int y, int button, int clickCount) { -// if (y > _h) -// close(); -//} +void TopMenu::handleMouseUp(int x, int y, int button, int clickCount) { + if (y > _h) + close(); + else + Dialog::handleMouseUp(x, y, button, clickCount); +} } // End of namespace Hugo diff --git a/engines/hugo/menu.h b/engines/hugo/menu.h index a68ad2514f..33d5db7b79 100644 --- a/engines/hugo/menu.h +++ b/engines/hugo/menu.h @@ -48,7 +48,7 @@ public: void reflowLayout(); void handleCommand(GUI::CommandSender *sender, uint32 command, uint32 data); -// void handleMouseUp(int x, int y, int button, int clickCount); + void handleMouseUp(int x, int y, int button, int clickCount); void loadBmpArr(Common::File &in); |