How to set text color?

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
Vinetu
Posts: 27
Joined: Wed Apr 07, 2004 6:57 am
Location: Lithuania
Contact:

How to set text color?

Post by Vinetu »

I know is function ...addStaticText(), but how change StaticText black color to another? Any suggestions?
"Teach yourself DISCIPLINE."

Your sincerely,
Saulius Šunauskas
bal
Posts: 829
Joined: Fri Jun 18, 2004 5:19 pm
Location: Geluwe, Belgium

Post by bal »

Grr, just look at the damn examples.
In Techdemo source:

Code: Select all

// set new font color

	device->getGUIEnvironment()->getSkin()->setColor(gui::EGDC_BUTTON_TEXT,
		video::SColor(255,100,100,100));
Vinetu
Posts: 27
Joined: Wed Apr 07, 2004 6:57 am
Location: Lithuania
Contact:

Post by Vinetu »

Thanks bal! I change text color now. If anyone is interesting here is my code:

gui::IGUIFont* font = device->getGUIEnvironment()->getFont("font.bmp");

if (font)
{
font->draw(L"some text",
core::rect<s32>(10, 10, 500, 500),
video::SColor(0, 225, 0, 0));
}
"Teach yourself DISCIPLINE."

Your sincerely,
Saulius Šunauskas
Post Reply