Skip to content

Commit

Permalink
WAGE: Render submenu item texts
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Jan 12, 2016
1 parent 506748c commit b911c63
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions engines/wage/menu.cpp
Expand Up @@ -272,6 +272,14 @@ void Menu::renderSubmenu(MenuItem *menu) {
Design::drawFilledRect(&_gui->_screen, *r, kColorWhite, _patterns, 1);
Design::drawRect(&_gui->_screen, *r, 1, kColorBlack, _patterns, 1);

int x = r->left + kMenuLeftMargin;
int y = r->top;
for (int i = 0; i < menu->subitems.size(); i++) {
_font->drawString(&_gui->_screen, menu->subitems[i]->text, x, y, r->width(), kColorBlack);

y += kMenuDropdownItemHeight;
}

g_system->copyRectToScreen(_gui->_screen.getBasePtr(r->left, r->top), _gui->_screen.pitch, r->left, r->top, r->width() + 1, r->height() + 1);
}

Expand Down

0 comments on commit b911c63

Please sign in to comment.