2D Toolkit Forum

2D Toolkit => Support => Topic started by: sstublic on April 24, 2013, 02:23:13 pm

Title: TextMesh and inline styling
Post by: sstublic on April 24, 2013, 02:23:13 pm
Hi!

I've been searching the forum a bit and I couldn't find an answer..

I need basic color change styling in my TextMesh. Can I do that? For example I would like to print out text "I like tk2d" with "I like" being white and "tk2d" being red.

Can I do that without creating 2 textmeshes and placing them next to each other? I mostly create textmeshes from scripts.

If it can't be done with inline escape codes, which method do you suggest that's quick and clean?

Thanks!
Title: Re: TextMesh and inline styling
Post by: unikronsoftware on April 24, 2013, 11:34:42 pm
You can use the "Gradients" feature, with solid colors for gradients if you just need to switch colors.
tk2d 2.0 will have support for inline color changes (including gradient changes).