Font Color IGUIButtons

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
Jorik
Posts: 44
Joined: Tue Dec 08, 2009 4:47 pm

Font Color IGUIButtons

Post by Jorik »

Hi,

i use a png that i created with irrlicht font maker as my random font for my font.

This works fine by drawing text.

The font size and type of the font are also displayed right on IGUIButtons.
But on the Buttons the font is automatically black and dont use my defined color.

Is there an way to change the color of the font on iguibuttons?(i written the text automatically at the creation of the buttons)
Bate
Posts: 364
Joined: Sun Nov 01, 2009 11:39 pm
Location: Germany

Post by Bate »

If you set the button text color in your skin it should work.

Code: Select all

mySkin = guienv->getSkin();
mySkin->setColor(EGDC_BUTTON_TEXT, SColor (255, 255,0,0)); // red
Never take advice from someone who likes to give advice, so take my advice and don't take it.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

right, you can only set the text colors for all buttons via gui skin...
so if you want one button with (e.g.) green text and another with red text you won't succeed... :cry:

or you can use my IrrExtensions where I added functions for setting each button text colors individualy, e.g. button->setOverrideColors(SColor cEnabled, SColor cDisabled); !!! ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply