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,10 +380,12 @@ void GuiManager::redraw() {
|
|||
_theme->clearAll();
|
||||
_theme->drawToBackbuffer();
|
||||
|
||||
if (!_displayTopDialogOnly) {
|
||||
for (DialogStack::size_type i = 0; i < _dialogStack.size() - 1; i++) {
|
||||
_dialogStack[i]->drawDialog(kDrawLayerBackground);
|
||||
_dialogStack[i]->drawDialog(kDrawLayerForeground);
|
||||
}
|
||||
}
|
||||
|
||||
// fall through
|
||||
|
||||
|
|
|
@ -140,6 +140,8 @@ public:
|
|||
|
||||
void initIconsSet();
|
||||
|
||||
void displayTopDialogOnly(bool mode);
|
||||
|
||||
protected:
|
||||
enum RedrawStatus {
|
||||
kRedrawDisabled = 0,
|
||||
|
@ -169,6 +171,8 @@ protected:
|
|||
int _topDialogLeftPadding;
|
||||
int _topDialogRightPadding;
|
||||
|
||||
bool _displayTopDialogOnly;
|
||||
|
||||
Common::Mutex _iconsMutex;
|
||||
Common::SearchSet _iconsSet;
|
||||
bool _iconsSetChanged;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue