From 11780744c296e997178791755204363d08c6f68a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 4 Jan 2011 21:45:09 +0000 Subject: HUGO: Proper implementation for menu closing when clicked outside of it svn-id: r55121 --- engines/hugo/menu.cpp | 10 ++++++---- 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); -- cgit v1.2.3