[Scummvm-cvs-logs] SF.net SVN: scummvm:[35789] scummvm/trunk/gui
tanoku at users.sourceforge.net
tanoku at users.sourceforge.net
Thu Jan 8 19:09:19 CET 2009
Revision: 35789
http://scummvm.svn.sourceforge.net/scummvm/?rev=35789&view=rev
Author: tanoku
Date: 2009-01-08 18:09:13 +0000 (Thu, 08 Jan 2009)
Log Message:
-----------
Fixed release critical bug #2472185. All transparent buttons should now properly refresh their text when changed between redrawing frames. This includes the launcher "Add game" button and the options "subtitle mode" button.
Modified Paths:
--------------
scummvm/trunk/gui/ThemeEngine.cpp
scummvm/trunk/gui/widget.cpp
Modified: scummvm/trunk/gui/ThemeEngine.cpp
===================================================================
--- scummvm/trunk/gui/ThemeEngine.cpp 2009-01-08 17:08:24 UTC (rev 35788)
+++ scummvm/trunk/gui/ThemeEngine.cpp 2009-01-08 18:09:13 UTC (rev 35789)
@@ -308,7 +308,7 @@
}
void ThemeEngine::restoreBackground(Common::Rect r) {
- r.clip(_screen.w, _screen.h); // AHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA... Oh god. :(
+ r.clip(_screen.w, _screen.h);
_vectorRenderer->blitSurface(&_backBuffer, r);
}
@@ -624,7 +624,7 @@
dd = kDDButtonDisabled;
queueDD(dd, r);
- queueDDText(getTextData(dd), r, str, true, false, _widgets[dd]->_textAlignH, _widgets[dd]->_textAlignV);
+ queueDDText(getTextData(dd), r, str, false, false, _widgets[dd]->_textAlignH, _widgets[dd]->_textAlignV);
}
void ThemeEngine::drawLineSeparator(const Common::Rect &r, WidgetStateInfo state) {
Modified: scummvm/trunk/gui/widget.cpp
===================================================================
--- scummvm/trunk/gui/widget.cpp 2009-01-08 17:08:24 UTC (rev 35788)
+++ scummvm/trunk/gui/widget.cpp 2009-01-08 18:09:13 UTC (rev 35789)
@@ -199,11 +199,16 @@
void StaticTextWidget::setLabel(const Common::String &label) {
_label = label;
- // TODO: We should automatically redraw when the label is changed.
- // The following doesn't quite work when we are using tabs, plus it
- // is rather clumsy to force a full redraw for a single static text.
- // However, as long as we do blending, it might be the only way.
- //_boss->draw();
+
+ // 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));
+ _boss->draw();
}
void StaticTextWidget::setAlign(Graphics::TextAlign align) {
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