Can I setOverride the font for a GUIListBox (or GUITable)?

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
joshcryer
Posts: 46
Joined: Thu Sep 13, 2007 8:57 am
Contact:

Can I setOverride the font for a GUIListBox (or GUITable)?

Post by joshcryer »

I refactored my code after realizing I could setOverride the static text and message boxes (my previous code used an index to GUIImage's, quite ugly and wrong). But now I'm stuck because I would like to change the font size of a ListBox, I just don't see how to do it, if it's even possible.

Thanks in advance.
joshcryer
Posts: 46
Joined: Thu Sep 13, 2007 8:57 am
Contact:

Post by joshcryer »

Anyone?
Luke Dean
Posts: 9
Joined: Tue Dec 11, 2007 5:59 am

Post by Luke Dean »

I think the ListBox is stuck with using the current skin's font, unless you want to make your own listbox class.
If you're overriding the fonts on each of your GUI controls individually, maybe you should just change the skin's default font?

IGUIFont* font = guienv->getFont("myfont.png");
guienv->getSkin()->setFont(font);
joshcryer
Posts: 46
Joined: Thu Sep 13, 2007 8:57 am
Contact:

Post by joshcryer »

Thanks Luke, I didn't realize setting the guienv font would fix it. Should be good enough.
Post Reply