[solved] Default text colour.

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

sueastside
Just popping in
Just popping in
Posts: 4
Joined: Thu Nov 19, 2009 21:18

[solved] Default text colour.

Postby sueastside » Thu Nov 19, 2009 21:34

Hello,

I just finished updating the Crystal Space's CEGUI renderer for 0.7. And as I was playing around with the new stringparser markup functionality([colour=""]), I couldn't seem to find a way to set a default text colour and overwrite it on a per window basis.

You used to do

Code: Select all

<Property name="TextColours" value="tl:FF000000 tr:FF000000 bl:FF000000 br:FF000000" />

but RenderedStringTextComponent.cpp:166 multiplies the colours, which blackens all, so things like [colour="FF00FFFF"] have no effect, even added images go black.

Ofcourse I could remove the TextColours property and stick with the default white, but then i'd have to add [colour="FF000000"] to all my text, which doesn't seem very practical, or am I missing an option somewhere?


Thank you.
Last edited by sueastside on Fri Dec 11, 2009 23:26, edited 1 time in total.

User avatar
DtD
Just popping in
Just popping in
Posts: 14
Joined: Fri Oct 09, 2009 18:54
Location: Kansas, United States
Contact:

Re: Default text colour.

Postby DtD » Fri Nov 20, 2009 00:38

Haven't use it, but it looks like you can use this property with your font to change it, so you might want to try it:
http://www.cegui.org.uk/api_reference/c ... 170b703bfe

~DtD

sueastside
Just popping in
Just popping in
Posts: 4
Joined: Thu Nov 19, 2009 21:18

Re: Default text colour.

Postby sueastside » Fri Nov 20, 2009 05:11

DtD wrote:Haven't use it, but it looks like you can use this property with your font to change it, so you might want to try it:
http://www.cegui.org.uk/api_reference/c ... 170b703bfe

~DtD



Thanks, but i don't see it exposed to an xml property anywhere, it would also require to make a new font for each colour variation.
So still not that practical :)

sueastside
Just popping in
Just popping in
Posts: 4
Joined: Thu Nov 19, 2009 21:18

Re: Default text colour.

Postby sueastside » Fri Dec 11, 2009 23:09

Revenge of the case sensitive property attributes.

http://www.cegui.org.uk/phpBB2/viewtopic.php?f=10&t=4549

Code: Select all

<Property Name="TextColours" Value="tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF" />


Notice Name and Value for properties in layouts, and lowercase in looknfeel.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: [solved] Default text colour.

Postby CrazyEddie » Sat Dec 12, 2009 09:34

Yeah, sorry :)

I'm considering making this less of an issue for non-xerces users by making the xml tags and attributes case-insensitive for future releases. What say you guys?

CE.

sueastside
Just popping in
Just popping in
Posts: 4
Joined: Thu Nov 19, 2009 21:18

Re: [solved] Default text colour.

Postby sueastside » Wed Dec 16, 2009 09:00

Sounds good.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 10 guests