Fixed bug in scalable font, that was visible in the tooltip

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7990 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2011-03-19 18:14:15 +00:00
parent 2c565911b1
commit 392bfe3e9c
2 changed files with 2 additions and 2 deletions

View File

@ -505,7 +505,7 @@ void ScalableFont::draw(const core::stringw& text,
c == L'\n' ) // Unix breaks
{
if(c==L'\r' && text[i+1]==L'\n') c = text[++i];
offset.Y += MaxHeight;
offset.Y += MaxHeight*m_scale;
offset.X = position.UpperLeftCorner.X;
if (hcenter)
offset.X += (position.getWidth() - text_dimension.Width) >> 1;

View File

@ -1375,7 +1375,7 @@ void Skin::drawTooltip(Widget* widget)
irr::gui::ScalableFont* font = GUIEngine::getSmallFont();
core::dimension2d<u32> size = font->getDimension(widget->getTooltipText().c_str());
core::position2di pos(widget->m_x + 15, widget->m_y + widget->m_h);
core::rect<s32> r(pos, size + core::dimension2d<u32>(0,15));
core::rect<s32> r(pos, size);
GUIEngine::getDriver()->draw2DRectangle( video::SColor(255, 200, 200, 200), r );
font->draw(widget->getTooltipText(), r, video::SColor(255, 0, 0, 0), false, false);
}