Skip to content

Commit

Permalink
GUI: Make ScrollContainerWidget do full redraw
Browse files Browse the repository at this point in the history
  • Loading branch information
Tkachov authored and sev- committed Jul 3, 2016
1 parent 425d963 commit 31e528c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gui/gui-manager.cpp
Expand Up @@ -564,6 +564,12 @@ void GuiManager::processEvent(const Common::Event &event, Dialog *const activeDi
}
}

void GuiManager::doFullRedraw() {
_redrawStatus = kRedrawFull;
redraw();
_system->updateScreen();
}

void GuiManager::giveFocusToDialog(Dialog *dialog) {
int16 dialogX = _globalMousePosition.x - dialog->_x;
int16 dialogY = _globalMousePosition.y - dialog->_y;
Expand Down
1 change: 1 addition & 0 deletions gui/gui-manager.h
Expand Up @@ -73,6 +73,7 @@ class GuiManager : public Common::Singleton<GuiManager> {
void runLoop();

void processEvent(const Common::Event &event, Dialog *const activeDialog);
void doFullRedraw();

bool isActive() const { return ! _dialogStack.empty(); }

Expand Down
1 change: 1 addition & 0 deletions gui/widgets/scrollcontainer.cpp
Expand Up @@ -83,6 +83,7 @@ void ScrollContainerWidget::handleCommand(CommandSender *sender, uint32 cmd, uin
_scrolledY = _verticalScroll->_currentPos;
reflowLayout();
draw();
g_gui.doFullRedraw();
break;
}
}
Expand Down

0 comments on commit 31e528c

Please sign in to comment.