Mercurial > fife-parpg
changeset 522:7b451e3b2439
FloatingTextRenderer no longer modifies the default font color when rendering.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Thu, 27 May 2010 18:26:11 +0000 |
parents | 494c60cf61cf |
children | d01eb65b2726 |
files | engine/core/view/renderers/floatingtextrenderer.cpp |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/engine/core/view/renderers/floatingtextrenderer.cpp Thu May 27 17:31:28 2010 +0000 +++ b/engine/core/view/renderers/floatingtextrenderer.cpp Thu May 27 18:26:11 2010 +0000 @@ -56,7 +56,7 @@ m_font(old.m_font) { setEnabled(true); } - + RendererBase* FloatingTextRenderer::clone() { return new FloatingTextRenderer(*this); } @@ -68,7 +68,7 @@ if (!m_font) { return; } - + RenderList::const_iterator instance_it = instances.begin(); const std::string* saytext = NULL; @@ -77,7 +77,6 @@ saytext = instance->getSayText(); if (saytext) { const Rect& ir = (*instance_it)->dimensions; - m_font->setColor(25,25,112); Image* img = m_font->getAsImageMultiline(*saytext); Rect r; r.x = (ir.x + ir.w/2) - img->getWidth()/2; /// the center of the text rect is always aligned to the instance's rect center. @@ -88,7 +87,7 @@ } } } - + FloatingTextRenderer* FloatingTextRenderer::getInstance(IRendererContainer* cnt) { return dynamic_cast<FloatingTextRenderer*>(cnt->getRenderer("FloatingTextRenderer")); }