Somewhat hackish fix for #680

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11431 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2012-07-23 22:06:10 +00:00
parent c7f2e957a4
commit aa9588bce7

View File

@@ -2250,12 +2250,16 @@ btQuaternion Kart::getVisualRotation() const
*/
void Kart::setOnScreenText(const wchar_t *text)
{
for (int n = 0 ; text[n] != 0; n++)
{
printf("%x\n", text[n]);
}
core::dimension2d<u32> textsize = GUIEngine::getFont()->getDimension(text);
scene::ISceneManager* sm = irr_driver->getSceneManager();
// FIXME: Titlefont is the only font guaranteed to be loaded if STK
// is started without splash screen (since "Loading" is shown even in this
// case). A smaller font would be better
sm->addBillboardTextSceneNode(GUIEngine::getTitleFont(),
sm->addBillboardTextSceneNode(GUIEngine::getFont() != NULL ? GUIEngine::getFont() : GUIEngine:getTitleFont(),
text,
getNode(),
core::dimension2df(textsize.Width/55.0f,