GUI: Implement drawing mode of top dialog only
This commit is contained in:
parent
26e5ef35ab
commit
7df3792ae3
2 changed files with 20 additions and 3 deletions
|
@ -78,6 +78,8 @@ GuiManager::GuiManager() : CommandSender(nullptr), _redrawStatus(kRedrawDisabled
|
|||
_topDialogLeftPadding = 0;
|
||||
_topDialogRightPadding = 0;
|
||||
|
||||
_displayTopDialogOnly = false;
|
||||
|
||||
// Clear the cursor
|
||||
memset(_cursor, 0xFF, sizeof(_cursor));
|
||||
|
||||
|
@ -343,6 +345,15 @@ void GuiManager::redrawFull() {
|
|||
_system->updateScreen();
|
||||
}
|
||||
|
||||
void GuiManager::displayTopDialogOnly(bool mode) {
|
||||
if (mode == _displayTopDialogOnly)
|
||||
return;
|
||||
|
||||
_displayTopDialogOnly = mode;
|
||||
|
||||
redrawFull();
|
||||
}
|
||||
|
||||
void GuiManager::redraw() {
|
||||
ThemeEngine::ShadingStyle shading;
|
||||
|
||||
|
@ -369,9 +380,11 @@ void GuiManager::redraw() {
|
|||
_theme->clearAll();
|
||||
_theme->drawToBackbuffer();
|
||||
|
||||
for (DialogStack::size_type i = 0; i < _dialogStack.size() - 1; i++) {
|
||||
_dialogStack[i]->drawDialog(kDrawLayerBackground);
|
||||
_dialogStack[i]->drawDialog(kDrawLayerForeground);
|
||||
if (!_displayTopDialogOnly) {
|
||||
for (DialogStack::size_type i = 0; i < _dialogStack.size() - 1; i++) {
|
||||
_dialogStack[i]->drawDialog(kDrawLayerBackground);
|
||||
_dialogStack[i]->drawDialog(kDrawLayerForeground);
|
||||
}
|
||||
}
|
||||
|
||||
// fall through
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue