GUI Item - Can you use two fonts?

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
ndavey
Posts: 5
Joined: Wed Nov 23, 2005 5:21 am
Location: Brisbane, AU

GUI Item - Can you use two fonts?

Post by ndavey »

Hi All,
Been seaching the forum, can't find anything that answers my question...

Q. Is it possible to have multiple fonts in the same gui?
eg. have a static text item with one font and everything else with another font?

I know I can set the font for the whole gui by setting the font for the skin, but I can't see a way of setting a font for a specific object..

Possible or not?

Cheers
Neil
Guest

Post by Guest »

with a bit of modification yes it is... or anything for that matter.

how extensive it is I couldn't say.

why can't you use seperate text boxes?

have you even seen the user modfied gui objects?

several people have already made multiple font text/chat boxes, consoles, table and tab controls you name it.

I'll be sure to keep this in mind while I create my own gui set.

~Midnight~
ndavey
Posts: 5
Joined: Wed Nov 23, 2005 5:21 am
Location: Brisbane, AU

Post by ndavey »

Thanks Midnight...

I feel like a goose... bit more poking through the help doc (RTFM wins again :)) and I found what I was after..

setOverrideFont in IGUIStaticText class...
Same applies to buttons and edit boxes..

Code: Select all

r = env->addStaticText(L"some Text",rect<s32>(10,110,250,200), false,true,wnd1,0,false);
font = env->getFont("somefont.bmp");
r->setOverrideFont(font);
doh... so simple once you know how... :)

Neil
G-ray
Posts: 5
Joined: Sat Nov 12, 2005 6:27 am
Location: Russia

Post by G-ray »

And how to do this in .NET version?
The spice must flow!
Post Reply