[Scummvm-cvs-logs] SF.net SVN: scummvm:[36225] scummvm/trunk/gui
tanoku at users.sourceforge.net
tanoku at users.sourceforge.net
Fri Feb 6 23:16:04 CET 2009
Revision: 36225
http://scummvm.svn.sourceforge.net/scummvm/?rev=36225&view=rev
Author: tanoku
Date: 2009-02-06 22:16:04 +0000 (Fri, 06 Feb 2009)
Log Message:
-----------
Removed special case when redrawing the dialog stack. Fixes bug #2555710 and several lesser graphical glitches with classic theme.
Modified Paths:
--------------
scummvm/trunk/gui/GuiManager.cpp
scummvm/trunk/gui/GuiManager.h
scummvm/trunk/gui/browser.cpp
scummvm/trunk/gui/dialog.cpp
scummvm/trunk/gui/options.cpp
scummvm/trunk/gui/widget.cpp
Modified: scummvm/trunk/gui/GuiManager.cpp
===================================================================
--- scummvm/trunk/gui/GuiManager.cpp 2009-02-06 19:44:15 UTC (rev 36224)
+++ scummvm/trunk/gui/GuiManager.cpp 2009-02-06 22:16:04 UTC (rev 36225)
@@ -139,30 +139,21 @@
if (_dialogStack.empty())
return;
- switch (_redrawStatus) {
- case kRedrawCloseDialog:
- case kRedrawFull:
- case kRedrawTopDialog:
- _theme->clearAll();
- _theme->openDialog(true);
+ if (_dialogStack.size() > 1) {
+ _theme->clearAll();
+ _theme->openDialog(true);
- for (i = 0; i < _dialogStack.size() - 1; i++) {
- _dialogStack[i]->drawDialog();
- }
+ for (i = 0; i < _dialogStack.size() - 1; i++)
+ _dialogStack[i]->drawDialog();
- _theme->finishBuffering();
- _theme->updateScreen();
+ _theme->finishBuffering();
+ _theme->updateScreen();
+ }
- case kRedrawOpenDialog:
- _theme->openDialog(true, (ThemeEngine::ShadingStyle)xmlEval()->getVar("Dialog." + _dialogStack.top()->_name + ".Shading", 0));
- _dialogStack.top()->drawDialog();
- _theme->finishBuffering();
- break;
+ _theme->openDialog(true, (ThemeEngine::ShadingStyle)xmlEval()->getVar("Dialog." + _dialogStack.top()->_name + ".Shading", 0));
+ _dialogStack.top()->drawDialog();
+ _theme->finishBuffering();
- default:
- return;
- }
-
_theme->updateScreen();
_redrawStatus = kRedrawDisabled;
}
@@ -247,8 +238,6 @@
if (_useStdCursor)
setupCursor();
-// _theme->refresh();
-
_themeChange = false;
_redrawStatus = kRedrawFull;
redraw();
@@ -347,8 +336,7 @@
void GuiManager::openDialog(Dialog *dialog) {
_dialogStack.push(dialog);
- if (_redrawStatus != kRedrawFull)
- _redrawStatus = kRedrawOpenDialog;
+ _redrawStatus = kRedrawFull;
// We reflow the dialog just before opening it. If the screen changed
// since the last time we looked, also refresh the loaded theme,
@@ -364,8 +352,7 @@
// Remove the dialog from the stack
_dialogStack.pop();
- if (_redrawStatus != kRedrawFull)
- _redrawStatus = kRedrawCloseDialog;
+ _redrawStatus = kRedrawFull;
}
void GuiManager::setupCursor() {
Modified: scummvm/trunk/gui/GuiManager.h
===================================================================
--- scummvm/trunk/gui/GuiManager.h 2009-02-06 19:44:15 UTC (rev 36224)
+++ scummvm/trunk/gui/GuiManager.h 2009-02-06 22:16:04 UTC (rev 36225)
@@ -91,9 +91,6 @@
protected:
enum RedrawStatus {
kRedrawDisabled = 0,
- kRedrawOpenDialog,
- kRedrawCloseDialog,
- kRedrawTopDialog,
kRedrawFull
};
Modified: scummvm/trunk/gui/browser.cpp
===================================================================
--- scummvm/trunk/gui/browser.cpp 2009-02-06 19:44:15 UTC (rev 36224)
+++ scummvm/trunk/gui/browser.cpp 2009-02-06 22:16:04 UTC (rev 36225)
@@ -43,7 +43,7 @@
*/
BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
- : Dialog("browser") {
+ : Dialog("Browser") {
_titleRef = CFStringCreateWithCString(0, title, CFStringGetSystemEncoding());
_isDirBrowser = dirBrowser;
}
Modified: scummvm/trunk/gui/dialog.cpp
===================================================================
--- scummvm/trunk/gui/dialog.cpp 2009-02-06 19:44:15 UTC (rev 36224)
+++ scummvm/trunk/gui/dialog.cpp 2009-02-06 22:16:04 UTC (rev 36225)
@@ -131,11 +131,7 @@
}
void Dialog::draw() {
- //TANOKU - FIXME when is this enabled? what does this do?
- // Update: called on tab drawing, mainly...
- // we can pass this as open a new dialog or something
-// g_gui._needRedraw = true;
- g_gui._redrawStatus = GUI::GuiManager::kRedrawTopDialog;
+ g_gui._redrawStatus = GUI::GuiManager::kRedrawFull;
}
void Dialog::drawDialog() {
Modified: scummvm/trunk/gui/options.cpp
===================================================================
--- scummvm/trunk/gui/options.cpp 2009-02-06 19:44:15 UTC (rev 36224)
+++ scummvm/trunk/gui/options.cpp 2009-02-06 22:16:04 UTC (rev 36225)
@@ -251,6 +251,8 @@
_subMode = getSubtitleMode(ConfMan.getBool("subtitles", _domain), ConfMan.getBool("speech_mute", _domain));
_subToggleButton->setLabel(_subModeDesc[_subMode]);
+ _subToggleButton->draw();
+
// Engines that reuse the subtitle speed widget set their own max value.
// Scale the config value accordingly (see addSubtitleControls)
Modified: scummvm/trunk/gui/widget.cpp
===================================================================
--- scummvm/trunk/gui/widget.cpp 2009-02-06 19:44:15 UTC (rev 36224)
+++ scummvm/trunk/gui/widget.cpp 2009-02-06 22:16:04 UTC (rev 36225)
@@ -199,15 +199,7 @@
void StaticTextWidget::setLabel(const Common::String &label) {
_label = label;
-
- // get parent's size
- const uint16 w = _boss->getWidth();
- const uint16 h = _boss->getHeight();
- const int16 x = _boss->getAbsX();
- const int16 y = _boss->getAbsY();
-
- // restore the parent's background and redraw it again.
- g_gui.theme()->restoreBackground(Common::Rect(x, y, x + w, y + h));
+ this->draw();
_boss->draw();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list