diff options
author | Eugene Sandulenko | 2019-12-22 12:03:16 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2019-12-22 12:03:41 +0100 |
commit | 2886f515399c3ceb2814fedd982bbe0d0674e648 (patch) | |
tree | 2f6c2fb8e8feb876ac7265e7b3f8660e5bf4c581 /graphics/macgui | |
parent | abc5e88d38f7e5c5bd04e2bf769407db9057a725 (diff) | |
download | scummvm-rg350-2886f515399c3ceb2814fedd982bbe0d0674e648.tar.gz scummvm-rg350-2886f515399c3ceb2814fedd982bbe0d0674e648.tar.bz2 scummvm-rg350-2886f515399c3ceb2814fedd982bbe0d0674e648.zip |
GRAPHICS: MACGUI: Show menu always when clicked
Diffstat (limited to 'graphics/macgui')
-rw-r--r-- | graphics/macgui/macmenu.cpp | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp index 8b738c78bd..6720a457e5 100644 --- a/graphics/macgui/macmenu.cpp +++ b/graphics/macgui/macmenu.cpp @@ -957,10 +957,10 @@ bool MacMenu::keyEvent(Common::Event &event) { bool MacMenu::mouseClick(int x, int y) { if (_bbox.contains(x, y)) { - for (uint i = 0; i < _items.size(); i++) + for (uint i = 0; i < _items.size(); i++) { if (_items[i]->bbox.contains(x, y)) { if ((uint)_activeItem == i) - return false; + return true; // We catch the event but do not do anything if (_activeItem != -1) { // Restore background if (_items[_activeItem]->submenu != nullptr) { @@ -984,26 +984,27 @@ bool MacMenu::mouseClick(int x, int y) { _menustack.push_back(_items[_activeItem]->submenu); _items[_activeItem]->submenu->highlight = -1; } + } + } - if (!_menuActivated) - _wm->activateMenu(); + if (!_menuActivated) + _wm->activateMenu(); - _menuActivated = true; + _menuActivated = true; - _contentIsDirty = true; - _wm->setFullRefresh(true); + _contentIsDirty = true; + _wm->setFullRefresh(true); - if (_wm->_mode & kWMModalMenuMode) { - draw(_wm->_screen); - eventLoop(); + if (_wm->_mode & kWMModalMenuMode) { + draw(_wm->_screen); + eventLoop(); - // Do not do full refresh as we took care of restoring - // the screen. WM is not even aware we were drawing. - _wm->setFullRefresh(false); - } + // Do not do full refresh as we took care of restoring + // the screen. WM is not even aware we were drawing. + _wm->setFullRefresh(false); + } - return true; - } + return true; } if (!_menuActivated) |