aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-01-11 20:46:57 +0100
committerEugene Sandulenko2016-01-11 20:46:57 +0100
commit644f1ef215eeb79ef70225b92ef6af1bf4f087e3 (patch)
tree7e9e9e70996da3614092c0b4d6723dc5e6e875e9
parentd485f7d7bb46889ef19eea1ae1b29f504c15a524 (diff)
downloadscummvm-rg350-644f1ef215eeb79ef70225b92ef6af1bf4f087e3.tar.gz
scummvm-rg350-644f1ef215eeb79ef70225b92ef6af1bf4f087e3.tar.bz2
scummvm-rg350-644f1ef215eeb79ef70225b92ef6af1bf4f087e3.zip
WAGE: Optimize menu redraws
-rw-r--r--engines/wage/gui.cpp6
-rw-r--r--engines/wage/menu.cpp3
2 files changed, 8 insertions, 1 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index 0771cb0d31..09468f571c 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -596,8 +596,12 @@ void Gui::mouseMove(int x, int y) {
Designed *Gui::getClickTarget(int x, int y) {
if (_menu->_menuActivated) {
- if (_menu->mouseRelease(x, y))
+ if (_menu->mouseRelease(x, y)) {
+ _sceneDirty = true;
+ _consoleDirty = true;
+ _bordersDirty = true;
_menuDirty = true;
+ }
return NULL;
}
diff --git a/engines/wage/menu.cpp b/engines/wage/menu.cpp
index f775a4d64c..fe5de5a5a4 100644
--- a/engines/wage/menu.cpp
+++ b/engines/wage/menu.cpp
@@ -211,6 +211,9 @@ bool Menu::mouseClick(int x, int y) {
if (_bbox.contains(x, y)) {
for (int i = 0; i < _items.size(); i++)
if (_items[i]->bbox.contains(x, y)) {
+ if (_activeItem == i)
+ return false;
+
_activeItem = i;
_activeSubItem = -1;
_menuActivated = true;