Author Topic: UILabel ColorTint overriding inline color?  (Read 1796 times)

sburgoon

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 19
    • View Profile
UILabel ColorTint overriding inline color?
« on: June 25, 2016, 03:59:20 PM »
There seems to be a change (not sure exactly when as I upgraded from a much earlier v3 version to 3.9) that I think is a bug in how UILabel inline color works. Previously, if you set inline color, it would override the global colortint of the label widget. Now the colorTint seems to be multiplied into the inline color. So if my text is set to be black by default, I now can't actually use inline colors as it still multiplies to black. Pretty easy to repro, just make a label and try to have the default text be black and set a word to red using inline coloring.

sburgoon

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 19
    • View Profile
Re: UILabel ColorTint overriding inline color?
« Reply #1 on: June 25, 2016, 04:24:15 PM »
Found the actual bug. It's in NGUIText.cs:

ParseSymbol is failing to set ignoreColor to true when it detects a 24 or 32bit color symbol, and likewise is not setting it to false when it encounters a [-] symbol. Not sure those are the only places its not setting things correctly, but making those 3 changes got things working for my purposes.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UILabel ColorTint overriding inline color?
« Reply #2 on: June 27, 2016, 06:26:51 AM »
Color tint is supposed to be a global color that blends with the inline one. If you don't want it to, use the [c] tag.