Hello Guest

Author Topic: TextMesh and inline styling  (Read 4246 times)

sstublic

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 8
    • View Profile
TextMesh and inline styling
« 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!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: TextMesh and inline styling
« Reply #1 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).