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;
|
_topDialogLeftPadding = 0;
|
||||||
_topDialogRightPadding = 0;
|
_topDialogRightPadding = 0;
|
||||||
|
|
||||||
|
_displayTopDialogOnly = false;
|
||||||
|
|
||||||
// Clear the cursor
|
// Clear the cursor
|
||||||
memset(_cursor, 0xFF, sizeof(_cursor));
|
memset(_cursor, 0xFF, sizeof(_cursor));
|
||||||
|
|
||||||
|
@ -343,6 +345,15 @@ void GuiManager::redrawFull() {
|
||||||
_system->updateScreen();
|
_system->updateScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GuiManager::displayTopDialogOnly(bool mode) {
|
||||||
|
if (mode == _displayTopDialogOnly)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_displayTopDialogOnly = mode;
|
||||||
|
|
||||||
|
redrawFull();
|
||||||
|
}
|
||||||
|
|
||||||
void GuiManager::redraw() {
|
void GuiManager::redraw() {
|
||||||
ThemeEngine::ShadingStyle shading;
|
ThemeEngine::ShadingStyle shading;
|
||||||
|
|
||||||
|
@ -369,9 +380,11 @@ void GuiManager::redraw() {
|
||||||
_theme->clearAll();
|
_theme->clearAll();
|
||||||
_theme->drawToBackbuffer();
|
_theme->drawToBackbuffer();
|
||||||
|
|
||||||
for (DialogStack::size_type i = 0; i < _dialogStack.size() - 1; i++) {
|
if (!_displayTopDialogOnly) {
|
||||||
_dialogStack[i]->drawDialog(kDrawLayerBackground);
|
for (DialogStack::size_type i = 0; i < _dialogStack.size() - 1; i++) {
|
||||||
_dialogStack[i]->drawDialog(kDrawLayerForeground);
|
_dialogStack[i]->drawDialog(kDrawLayerBackground);
|
||||||
|
_dialogStack[i]->drawDialog(kDrawLayerForeground);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// fall through
|
// fall through
|
||||||
|
|
|
@ -140,6 +140,8 @@ public:
|
||||||
|
|
||||||
void initIconsSet();
|
void initIconsSet();
|
||||||
|
|
||||||
|
void displayTopDialogOnly(bool mode);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
enum RedrawStatus {
|
enum RedrawStatus {
|
||||||
kRedrawDisabled = 0,
|
kRedrawDisabled = 0,
|
||||||
|
@ -169,6 +171,8 @@ protected:
|
||||||
int _topDialogLeftPadding;
|
int _topDialogLeftPadding;
|
||||||
int _topDialogRightPadding;
|
int _topDialogRightPadding;
|
||||||
|
|
||||||
|
bool _displayTopDialogOnly;
|
||||||
|
|
||||||
Common::Mutex _iconsMutex;
|
Common::Mutex _iconsMutex;
|
||||||
Common::SearchSet _iconsSet;
|
Common::SearchSet _iconsSet;
|
||||||
bool _iconsSetChanged;
|
bool _iconsSetChanged;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue