From 392bfe3e9cf73fa03e8681791fb64ba0718a2e61 Mon Sep 17 00:00:00 2001 From: auria Date: Sat, 19 Mar 2011 18:14:15 +0000 Subject: [PATCH] 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 --- src/guiengine/scalable_font.cpp | 2 +- src/guiengine/skin.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/guiengine/scalable_font.cpp b/src/guiengine/scalable_font.cpp index 9e760f80e..1dc26aa36 100644 --- a/src/guiengine/scalable_font.cpp +++ b/src/guiengine/scalable_font.cpp @@ -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; diff --git a/src/guiengine/skin.cpp b/src/guiengine/skin.cpp index 323980f1f..19fe663e2 100644 --- a/src/guiengine/skin.cpp +++ b/src/guiengine/skin.cpp @@ -1375,7 +1375,7 @@ void Skin::drawTooltip(Widget* widget) irr::gui::ScalableFont* font = GUIEngine::getSmallFont(); core::dimension2d size = font->getDimension(widget->getTooltipText().c_str()); core::position2di pos(widget->m_x + 15, widget->m_y + widget->m_h); - core::rect r(pos, size + core::dimension2d(0,15)); + core::rect 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); }