From 919af98314473eadd139b1949e353342e4b6a508 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 17 Apr 2005 11:20:59 +0000 Subject: Added Dialog::wantsScaling(), to allow dialogs to turn off automatic scaling svn-id: r17646 --- gui/newgui.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gui/newgui.cpp') diff --git a/gui/newgui.cpp b/gui/newgui.cpp index 59f7149123..a9b6070efc 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -106,6 +106,7 @@ void NewGui::runLoop() { // EVENT_SCREEN_CHANGED is received. However, not yet all backends support // that event, so we also do it "manually" whenever a run loop is entered. updateColors(); + _scaleEnable = activeDialog->wantsScaling(); updateScaleFactor(); if (!_stateIsSaved) { @@ -121,8 +122,13 @@ void NewGui::runLoop() { // This is necessary to get the blending right. _system->clearOverlay(); _system->grabOverlay((OverlayColor *)_screen.pixels, _screenPitch); - for (int i = 0; i < _dialogStack.size(); i++) + for (int i = 0; i < _dialogStack.size(); i++) { + // For each dialog we draw we have to ensure the correct + // scaling mode is active. + _scaleEnable = _dialogStack[i]->wantsScaling(); + updateScaleFactor(); _dialogStack[i]->drawDialog(); + } _needRedraw = false; } -- cgit v1.2.3