Use skin font for usernames (fixes #2363)

This commit is contained in:
BlockMen 2015-02-20 23:10:23 +01:00
parent cf4045ff0f
commit aa31e3c7f3

@ -962,7 +962,7 @@ void GenericCAO::addToScene(scene::ISceneManager *smgr, ITextureSource *tsrc,
// Add a text node for showing the name // Add a text node for showing the name
gui::IGUIEnvironment* gui = irr->getGUIEnvironment(); gui::IGUIEnvironment* gui = irr->getGUIEnvironment();
std::wstring wname = narrow_to_wide(m_name); std::wstring wname = narrow_to_wide(m_name);
m_textnode = smgr->addTextSceneNode(gui->getBuiltInFont(), m_textnode = smgr->addTextSceneNode(gui->getSkin()->getFont(),
wname.c_str(), video::SColor(255,255,255,255), node); wname.c_str(), video::SColor(255,255,255,255), node);
m_textnode->grab(); m_textnode->grab();
m_textnode->setPosition(v3f(0, BS*1.1, 0)); m_textnode->setPosition(v3f(0, BS*1.1, 0));