mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 12:48:16 +00:00
GUI: Fix top dialog only drawing
Before that the parent was also drawn.
This commit is contained in:
parent
e51766c768
commit
c6451a2ec9
@ -393,15 +393,22 @@ void GuiManager::redraw() {
|
||||
// This case is an optimization to avoid redrawing the whole dialog
|
||||
// stack when opening a new dialog.
|
||||
|
||||
_theme->drawToBackbuffer();
|
||||
if (_displayTopDialogOnly) {
|
||||
// When displaying only the top dialog clear the screen
|
||||
if (_redrawStatus == kRedrawOpenDialog) {
|
||||
_theme->clearAll();
|
||||
_theme->drawToBackbuffer();
|
||||
}
|
||||
} else {
|
||||
_theme->drawToBackbuffer();
|
||||
|
||||
if (_redrawStatus == kRedrawOpenDialog && _dialogStack.size() > 1) {
|
||||
Dialog *previousDialog = _dialogStack[_dialogStack.size() - 2];
|
||||
previousDialog->drawDialog(kDrawLayerForeground);
|
||||
}
|
||||
if (_redrawStatus == kRedrawOpenDialog && _dialogStack.size() > 1) {
|
||||
Dialog *previousDialog = _dialogStack[_dialogStack.size() - 2];
|
||||
previousDialog->drawDialog(kDrawLayerForeground);
|
||||
}
|
||||
|
||||
if (!_displayTopDialogOnly)
|
||||
_theme->applyScreenShading(shading);
|
||||
}
|
||||
|
||||
_dialogStack.top()->drawDialog(kDrawLayerBackground);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user