IGUIFont::draw()

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.
Post Reply
emre2345
Posts: 37
Joined: Mon Jul 09, 2007 7:02 pm

IGUIFont::draw()

Post by emre2345 »

i have loaded the fonts with the oldFontEngine in irrlicht 1.3.1, but now draw() function doesn't work

f->draw(L"...", rect<s32>(180, 100, 280, 130), SColor(255, 255, 255, 255));

actually i want to add a white text to GUIEnvironment, but i couldn't manage to do it with addStaticText() function so i tried draw() func. if there is a way to add text with static text in white color, please tell me how:)

what can be the reason?

In the mean time does newFontEngine work well?
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Re: IGUIFont::draw()

Post by MasterGod »

emre2345 wrote:In the mean time does newFontEngine work well?
Yes.

You can check my project -> credit stuff and see how I draw text, I use fonts AND IGUIStaticText so check it out it might help you.
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

I think to get the static text in white you just have to do this:

pStatic_text->setOverrideColor(Scolor(255,255,255,255));
Image Image Image
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

JP wrote:I think to get the static text in white you just have to do this:

pStatic_text->setOverrideColor(Scolor(255,255,255,255));
yeah but he's trying to display with font..
Maybe if you're going this way also do something like this:
pStatic_text->setOverrideFont(MyFont);
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
Post Reply