Skip to content

Commit

Permalink
WAGE: Copy screen to backbuffer when entering menu
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Jan 13, 2016
1 parent d0b60fe commit 02e0498
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engines/wage/menu.cpp
Expand Up @@ -179,6 +179,8 @@ Menu::Menu(Gui *gui) : _gui(gui) {
_menuActivated = false;
_activeItem = -1;
_activeSubItem = -1;

_screenCopy.create(_gui->_screen.w, _gui->_screen.h, Graphics::PixelFormat::createFormatCLUT8());
}

Menu::~Menu() {
Expand Down Expand Up @@ -286,6 +288,8 @@ void Menu::renderSubmenu(MenuItem *menu) {

bool Menu::mouseClick(int x, int y) {
if (_bbox.contains(x, y)) {
_screenCopy.copyFrom(_gui->_screen);

for (int i = 0; i < _items.size(); i++)
if (_items[i]->bbox.contains(x, y)) {
if (_activeItem == i)
Expand Down
1 change: 1 addition & 0 deletions engines/wage/menu.h
Expand Up @@ -69,6 +69,7 @@ class Menu {
private:
Gui *_gui;
Patterns _patterns;
Graphics::Surface _screenCopy;

private:
const Graphics::Font *getMenuFont();
Expand Down

0 comments on commit 02e0498

Please sign in to comment.