Skip to content

Commit

Permalink
WAGE: Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Jan 11, 2016
1 parent db9a966 commit 80bea99
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions engines/wage/menu.cpp
Expand Up @@ -199,13 +199,14 @@ void Menu::render() {

for (int i = 0; i < _items.size(); i++) {
int color = kColorBlack;
MenuItem *it = _items[i];

if (_activeItem == i) {
Design::drawFilledRect(&_gui->_screen, _items[i]->bbox, kColorBlack, p, 1);
Design::drawFilledRect(&_gui->_screen, it->bbox, kColorBlack, p, 1);
color = kColorWhite;
}

_font->drawString(&_gui->_screen, _items[i]->name, _items[i]->bbox.left + kMenuLeftMargin, _items[i]->bbox.top, _items[i]->bbox.width(), color);
_font->drawString(&_gui->_screen, it->name, it->bbox.left + kMenuLeftMargin, it->bbox.top, it->bbox.width(), color);
}

g_system->copyRectToScreen(_gui->_screen.getPixels(), _gui->_screen.pitch, 0, 0, _gui->_screen.w, kMenuHeight);
Expand Down

0 comments on commit 80bea99

Please sign in to comment.