[Scummvm-cvs-logs] SF.net SVN: scummvm:[33154] scummvm/branches/gsoc2008-gui/gui/ThemeRenderer .cpp
Tanoku at users.sourceforge.net
Tanoku at users.sourceforge.net
Mon Jul 21 00:23:52 CEST 2008
Revision: 33154
http://scummvm.svn.sourceforge.net/scummvm/?rev=33154&view=rev
Author: Tanoku
Date: 2008-07-20 22:23:35 +0000 (Sun, 20 Jul 2008)
Log Message:
-----------
Fixed: Text/button drawing
Modified Paths:
--------------
scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp
Modified: scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp 2008-07-20 21:54:32 UTC (rev 33153)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp 2008-07-20 22:23:35 UTC (rev 33154)
@@ -193,6 +193,8 @@
bool ThemeRenderer::addTextStep(Common::String &drawDataId, Graphics::TextStep step) {
DrawData id = getDrawDataId(drawDataId);
+
+ step.font = 0;
if (id != -1) {
assert(_widgets[id] != 0);
@@ -200,7 +202,6 @@
return false;
_widgets[id]->_textStep = step;
- _widgets[id]->_textStep.font = 0;
_widgets[id]->_hasText = true;
} else {
if (drawDataId == "default") {
@@ -324,9 +325,6 @@
}
void ThemeRenderer::queueDDText(DrawData type, const Common::Rect &r, const Common::String &text, TextColor colorId, TextAlign align) {
- if (!hasWidgetText(type))
- return;
-
DrawQueueText q;
q.type = type;
q.area = r;
@@ -363,10 +361,12 @@
addDirtyRect(extendedRect);
}
-void ThemeRenderer::drawDDText(const DrawQueueText &q) {
- restoreBackground(q.area);
-
+void ThemeRenderer::drawDDText(const DrawQueueText &q) {
if (q.type == kDDNone) {
+ restoreBackground(q.area);
+ if (_texts[q.colorId].font == 0)
+ _texts[q.colorId].font = _font;
+
_vectorRenderer->textStep(q.text, q.area, _texts[q.colorId], q.align);
} else {
if (_widgets[q.type]->_textStep.font == 0)
@@ -622,7 +622,7 @@
if (doBuffer)
_buffering = true;
- memcpy(_backBuffer->pixels, _screen->pixels, _screen->w * _screen->h * _screen->bytesPerPixel);
+// memcpy(_backBuffer->pixels, _screen->pixels, _screen->w * _screen->h * _screen->bytesPerPixel);
}
} // end of namespace GUI.
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