how to set color for white GText?

40 views
Skip to first unread message

Ren Chaos

unread,
Sep 10, 2015, 4:54:39 AM9/10/15
to Genome2D
hi guys:

Im trying to set color for GText,but it's not working. why?

my gtext still white color.

here is my code:

      gtext.node.color = 0x000000;

it's so werid ,because I try gsprite.node.color = 0x000000;  it will work as I expect, gsprite's color turn to black;

.is have any  other way to change white gtext's color ? plz help.



Peter Stefcek

unread,
Sep 10, 2015, 7:54:36 AM9/10/15
to Genome2D, Ren Chaos
sorry for the delay i am currently on an expedition in Kyrgyzstan without computer i will get to your issue once i am back next wednesday. You can also try to check/fix yourseflf in the github sources if needed.

Peter

--
You received this message because you are subscribed to the Google Groups "Genome2D" group.
To unsubscribe from this group and stop receiving emails from it, send an email to genome2d+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ren Chaos

unread,
Sep 10, 2015, 9:36:24 AM9/10/15
to Genome2D, renfr...@gmail.com
it's ok . thx for reply, im using textfield with GFlashObject instend temporary。

Im try to fix it,but still no cule with it,

have fun with expedition。
:)

sHTiF於 2015年9月10日星期四 UTC+8下午7時54分36秒寫道:

sHTiF

unread,
Sep 16, 2015, 10:39:12 AM9/16/15
to Genome2D, renfr...@gmail.com
Hi, so I am finally back from my expedition and looked at the issue.

Atm, the GText and its renderer doesn't take into account world color information (the node hierarchy colors) but you still can set the text of the color easily using the red,green,blue,alpha attributes at the actual GText component's renderer.

gtext.renderer.red = 1;
gtext.renderer.green = 0;
gtext.renderer.blue = 0;

Will set the color to red, assuming the font texture is white obviously.
Reply all
Reply to author
Forward
0 new messages