Reduce font size when intro subtitles are too large
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11911 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -52,8 +52,17 @@ void CutsceneGUI::renderGlobal(float dt)
|
||||
{
|
||||
core::rect<s32> r(0, UserConfigParams::m_height - GUIEngine::getFontHeight()*2,
|
||||
UserConfigParams::m_width, UserConfigParams::m_height);
|
||||
GUIEngine::getFont()->draw(m_subtitle, r,
|
||||
video::SColor(255,255,255,255), true, true, NULL);
|
||||
|
||||
if (GUIEngine::getFont()->getDimension(m_subtitle.c_str()).Width > UserConfigParams::m_width)
|
||||
{
|
||||
GUIEngine::getSmallFont()->draw(m_subtitle, r,
|
||||
video::SColor(255,255,255,255), true, true, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
GUIEngine::getFont()->draw(m_subtitle, r,
|
||||
video::SColor(255,255,255,255), true, true, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user