Now I'm having problems changing the color of it in game.
It should be pretty easy to change the color of it, because in the looknfeel file, there is this for it:
Code: Select all
<StateImagery name="EnabledProgress">
<Layer>
<Section section="progress_lights">
<Colours topLeft="FF2222FF" topRight="FF2222FF" bottomLeft="FF2222FF" bottomRight="FF2222FF" />
</Section>
</Layer>
</StateImagery>
Now, I tried to do something like this in my code:
Code: Select all
CEGUI::colour colorHP(1.0, 0.0, 0.0, 1.0);
wMgr->getWindow("playerHP")->setProperty("SelectionColour", CEGUI::PropertyHelper::colourToString(colorHP));
This does not work, because "SelectionColour" is not a valid property type for the Progress Bar.
The only ones I found for the Progress Bar were these:
http://www.cegui.org.uk/wiki/index.php/SetProperty_(WindowsLook)#ProgressBar
No where in that list does it have anything to change the colors of the progress bar.
I read another post about this, but it's modification of the LooknFeel flie... which I don't really want to do:
http://www.cegui.org.uk/phpBB2/viewtopic.php?f=2&t=1497&hilit=progress+bar+colour
Please tell me there is an easy way to change the color of the progress bar within my code, and not having to modify the looknfeel file.
--------------------------
Also, I'm having problems setting text colors for a static text.
It seems easy, but I'm getting an error saying:
Code: Select all
cannot convert paramter 2 from 'CEGUI::colour' to 'const CEGUI::String&'
Reason: cannot convert from 'CEGUI::colour' to 'const CEGUI::String'
This is what I wrote:
Code: Select all
CEGUI::String color = "tl:ff000000 tr:ff000000 bl:ff000000 br:ff000000";
wMgr->getWindow("minimap_title")->setProperty("TextColours", CEGUI::PropertyHelper::stringToColour(color))
I don't THINK the Tl,Tr,Bl,Br is of type color, so I'm guessing that's what wrong with this...
I also noticed for the TextColours in the SetProperty reference page, this specific item is colored Orange...
Is this something specific to Falagard, and do I need to do something different?
I've set colors before for a ListboxItem, but I had to Create new ones and set their SelectionColour, not TextColour for existing items.