is it possible to change the color of a StaticText?
This is my code:
guienv = device->getGUIEnvironment();
IGUISkin* skin = guienv->getSkin();
IGUIFont* font = guienv->getFont("../../media/fontnwn.bmp");
if (font)
skin->setFont(font);
guienv->addStaticText(L"Test", true, rect<int>(10,10,200,30));
I Looked for a function to change the color of the static text but i didn't find.. any suggestion?
Thanks.
Gui, StatiText and Color..
It's possible, but ...
... you "simply" have to set the color of the Button-Texts, e.g.
Code: Select all
guienv = device->getGUIEnvironment();
IGUISkin* skin = guienv->getSkin();
IGUIFont* font = guienv->getFont("../../media/fontnwn.bmp");
if (font)
skin->setFont(font);
skin->setColor(gui::EGDC_BUTTON_TEXT, video::SColor(0,255,255,255)) // Sets the Button-Text Color to white...
guienv->addStaticText(L"Test", true, rect<int>(10,10,200,30));
Great Engine, Niko, keep up the good work!
Since 0.4 its also possible to set the color or font for every static text, more easily.
Take a look at:http://irrlicht.sourceforge.net/docu/cl ... cText.html
Just do it like this:
Take a look at:http://irrlicht.sourceforge.net/docu/cl ... cText.html
Just do it like this:
Code: Select all
yourText->setOverrideColor(newColor)