From 04dfa9b0a99033511b30289bac7f9a064769c220 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 11 Jul 2018 22:21:02 +0200 Subject: GRAPHICS: MACGUI: Made autohiding menu reentrable --- graphics/macgui/macmenu.cpp | 5 ++++- graphics/macgui/macmenu.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp index 0d25ea7a41..cb8c9b51cc 100644 --- a/graphics/macgui/macmenu.cpp +++ b/graphics/macgui/macmenu.cpp @@ -549,9 +549,12 @@ bool MacMenu::mouseClick(int x, int y) { } bool MacMenu::mouseMove(int x, int y) { - if (_menuActivated) + if (_menuActivated) { if (mouseClick(x, y)) return true; + } else if ((_wm->_mode & kWMModeAutohideMenu) && !_bbox.contains(x, y)) { + _isVisible = false; + } return false; } diff --git a/graphics/macgui/macmenu.h b/graphics/macgui/macmenu.h index 08c8f41c23..c98dd1f0d6 100644 --- a/graphics/macgui/macmenu.h +++ b/graphics/macgui/macmenu.h @@ -66,7 +66,7 @@ public: bool hasAllFocus() { return _menuActivated; } bool isVisible() { return _isVisible; } - void setVisible(bool visible) { _isVisible = visible; } + void setVisible(bool visible) { _isVisible = visible; _contentIsDirty = true; } Common::Rect _bbox; -- cgit v1.2.3