If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Tocs1001
Posts: 10 Joined: Tue Jun 27, 2006 7:15 pm
Post
by Tocs1001 » Fri Oct 27, 2006 1:39 am
I tried following the tutorial but its not working at all!
Code: Select all
void CGuiLayer::setFont (const char * file)
{
IGUISkin* skin = guienv->getSkin();
IGUIFont* font = guienv->getFont(file);
if (font)
{
skin->setFont(font);
}
}
and the string I'm passing it is "BigBoldArial.bmp"
BigBoldArial.bmp was created by the font tool and placed in the debug filter however the font isnt changeing I'm really confused =(
the problem is on the getFont (file); line because its not giving font anything to point to and never jumps inside the if-statement
strale
Posts: 119 Joined: Wed Nov 23, 2005 1:58 pm
Location: Lambrugo Italy
Contact:
Post
by strale » Fri Oct 27, 2006 7:23 am
hi
i used this and work fine
IGUISkin* skin = guienv->getSkin();
IGUIFont* font = guienv->getFont("./Media/Currier.bmp");
if (font) {
skin->setFont(font);
}
how do you use
CGuiLayer::setFont (
may be you dont set the correct path
cheers
JP
Posts: 4526 Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:
Post
by JP » Fri Oct 27, 2006 10:13 am
Check the console to see if Irrlicht is having trouble finding the font file you're trying to load, possibly your path is wrong.
Tocs1001
Posts: 10 Joined: Tue Jun 27, 2006 7:15 pm
Post
by Tocs1001 » Sat Oct 28, 2006 3:02 am
Well turns out if I hit the run button from within my IDE relative paths get butchered XD but if i click the exe it all works out 0_o
JP
Posts: 4526 Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:
Post
by JP » Sat Oct 28, 2006 9:03 am
Does your IDE have a "resources folder" set which it basically sets as the root folder? I know my Java IDE did that, but then it still worked the same wherever you called it from!