Skip to content

Commit

Permalink
WAGE: Retore background with menu hovering
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Jan 13, 2016
1 parent 02e0498 commit a45c66b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion engines/wage/menu.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit a45c66b

Please sign in to comment.