aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui
diff options
context:
space:
mode:
authorEugene Sandulenko2019-10-03 15:20:21 +0200
committerEugene Sandulenko2019-10-03 21:51:28 +0200
commit55c5664cedcf978560ea3277a99a92a181be8021 (patch)
tree16b79b87bf505eca154087b322a96c2fa53e1f57 /graphics/macgui
parentc6930f2f78471e1af3e70967b1f3f7142c233bc4 (diff)
downloadscummvm-rg350-55c5664cedcf978560ea3277a99a92a181be8021.tar.gz
scummvm-rg350-55c5664cedcf978560ea3277a99a92a181be8021.tar.bz2
scummvm-rg350-55c5664cedcf978560ea3277a99a92a181be8021.zip
GRPAHICS: MACGUI: Avoid overdraw
Diffstat (limited to 'graphics/macgui')
-rw-r--r--graphics/macgui/macmenu.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp
index 61fa02b7b9..9d05c76fc3 100644
--- a/graphics/macgui/macmenu.cpp
+++ b/graphics/macgui/macmenu.cpp
@@ -836,15 +836,13 @@ bool MacMenu::mouseClick(int x, int y) {
return false;
if (_menustack.size() > 0 && _menustack.back()->bbox.contains(x, y)) {
- MacMenuSubMenu *it = _menustack.back();
- int numSubItem = MIN<int>((y - it->bbox.top) / kMenuDropdownItemHeight, it->subitems.size() - 1);
+ MacMenuSubMenu *menu = _menustack.back();
+ int numSubItem = MIN<int>((y - menu->bbox.top) / kMenuDropdownItemHeight, menu->subitems.size() - 1);
if (numSubItem != _activeSubItem) {
_activeSubItem = numSubItem;
+ menu->highlight = _activeSubItem;
- it->highlight = _activeSubItem;
-
- renderSubmenu(it);
_contentIsDirty = true;
}
@@ -873,11 +871,8 @@ bool MacMenu::mouseClick(int x, int y) {
MacMenuSubMenu *menu = _menustack.back();
_activeSubItem = MIN<int>((y - menu->bbox.top) / kMenuDropdownItemHeight, menu->subitems.size() - 1);
-
menu->highlight = _activeSubItem;
- renderSubmenu(menu);
-
_contentIsDirty = true;
return true;
@@ -888,7 +883,6 @@ bool MacMenu::mouseClick(int x, int y) {
_activeSubItem = -1;
if (_menustack.size()) {
- renderSubmenu(_menustack.back());
_contentIsDirty = true;
}