From a45c66b5a78f9aed00a494ab84ff164791ae7538 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 13 Jan 2016 11:08:41 +0100 Subject: WAGE: Retore background with menu hovering --- engines/wage/menu.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/engines/wage/menu.cpp b/engines/wage/menu.cpp index 681fb624b7..7c680d7c68 100644 --- a/engines/wage/menu.cpp +++ b/engines/wage/menu.cpp @@ -288,13 +288,21 @@ void Menu::renderSubmenu(MenuItem *menu) { bool Menu::mouseClick(int x, int y) { if (_bbox.contains(x, y)) { - _screenCopy.copyFrom(_gui->_screen); + if (!_menuActivated) + _screenCopy.copyFrom(_gui->_screen); for (int i = 0; i < _items.size(); i++) if (_items[i]->bbox.contains(x, y)) { if (_activeItem == i) return false; + if (_activeItem != -1) { + Common::Rect *r = &_items[_activeItem]->subbbox; + + _gui->_screen.copyRectToSurface(_screenCopy, r->left, r->top, *r); + g_system->copyRectToScreen(_gui->_screen.getBasePtr(r->left, r->top), _gui->_screen.pitch, r->left, r->top, r->width() + 1, r->height() + 1); + } + _activeItem = i; _activeSubItem = -1; _menuActivated = true; -- cgit v1.2.3