diff options
| author | Vicent Marti | 2008-07-20 22:23:35 +0000 | 
|---|---|---|
| committer | Vicent Marti | 2008-07-20 22:23:35 +0000 | 
| commit | 4e7b9f287ea7ce65ad2d59ca538b6520f81c4765 (patch) | |
| tree | 5fb813d4fdd9c77f807a9cd085996c716b15b5ef | |
| parent | 9aa07d206e679179f939e9beb0d441eb0c1a1fcb (diff) | |
| download | scummvm-rg350-4e7b9f287ea7ce65ad2d59ca538b6520f81c4765.tar.gz scummvm-rg350-4e7b9f287ea7ce65ad2d59ca538b6520f81c4765.tar.bz2 scummvm-rg350-4e7b9f287ea7ce65ad2d59ca538b6520f81c4765.zip  | |
Fixed: Text/button drawing
svn-id: r33154
| -rw-r--r-- | gui/ThemeRenderer.cpp | 16 | 
1 files changed, 8 insertions, 8 deletions
diff --git a/gui/ThemeRenderer.cpp b/gui/ThemeRenderer.cpp index 6c31dcf7a0..35d984b17c 100644 --- a/gui/ThemeRenderer.cpp +++ b/gui/ThemeRenderer.cpp @@ -193,6 +193,8 @@ void ThemeRenderer::addDrawStep(Common::String &drawDataId, Graphics::DrawStep s  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 @@ bool ThemeRenderer::addTextStep(Common::String &drawDataId, Graphics::TextStep s  			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::queueDD(DrawData type, const Common::Rect &r, uint32 dynamic  }  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 @@ void ThemeRenderer::drawDD(const DrawQueue &q, bool draw, bool restore) {  	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 @@ void ThemeRenderer::openDialog(bool doBuffer) {  	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.  | 
