GUI: Fix sliding up of the console

#4953 optimized redrawing of the top dialog in commit f824f8a. This
however broke console's sliding up as the code in question depended on
the fact that it was internally equivalent to a full redraw.
This commit is contained in:
Miro Kropacek 2023-05-11 23:53:17 +02:00
parent 23e31dd2cf
commit b5dc9dd949
3 changed files with 6 additions and 1 deletions

View File

@ -247,7 +247,7 @@ void ConsoleDialog::handleTickle() {
//_slideMode = kNoSlideMode;
close();
} else
g_gui.scheduleTopDialogRedraw();
g_gui.scheduleFullRedraw();
}
_scrollBar->handleTickle();

View File

@ -811,6 +811,10 @@ void GuiManager::scheduleTopDialogRedraw() {
_redrawStatus = kRedrawTopDialog;
}
void GuiManager::scheduleFullRedraw() {
_redrawStatus = kRedrawFull;
}
void GuiManager::giveFocusToDialog(Dialog *dialog) {
int16 dialogX = _globalMousePosition.x - dialog->_x;
int16 dialogY = _globalMousePosition.y - dialog->_y;

View File

@ -88,6 +88,7 @@ public:
void processEvent(const Common::Event &event, Dialog *const activeDialog);
Common::Keymap *getKeymap() const;
void scheduleTopDialogRedraw();
void scheduleFullRedraw();
bool isActive() const { return ! _dialogStack.empty(); }