Author Topic: UILabel bbcode Color only modifying existing label color tint?  (Read 9765 times)

chrisfirefox

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 9
    • View Profile
UILabel bbcode Color only modifying existing label color tint?
« on: December 22, 2014, 07:13:02 AM »
Hey there,

I'm on Version 3.7.7 of NGUI Pro, and I believe to remember that using bbcode, I was able to output any color of text regardless of base Component tint.

Right now I observe a behaviour that just tints the base tint of the rendered text with the desired color, instead of replacing it. An example: I want to have a tint of the label of #ca9b6a, and in the second line of the label, I want a text in white.

I tried it as shown in the following picture, which had no effect:


And instead of replacing the lower part with grey, it just darkens the brown color of the label here:


It works fine if I invert the colors, meaning I use a white tint and just colorize the brown parts:


As I said, this might also be my memory fooling me, but I believe that was different in previous versions. IMHO it is rather impractical to be forced to have white tint for any type of multicolored label text. Therefore I would vote for this behaviour to be changed to a more intuitive "replace" instead (or fixed if it is unintended). Or at least make an option available to switch between the two behaviours of tint and replace.

I just wanted to add that NGUI is one of the greatest extensions to Unity I ever encountered, documentation could be better, but functionality is simply top of the notch, super flexible and yet super powerful, thank you very much for creating this!

AGB

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 74
    • View Profile
    • Steam Defense
Re: UILabel bbcode Color only modifying existing label color tint?
« Reply #1 on: December 27, 2014, 04:05:58 PM »
It really was like yo said before, you are right. But already a while it works like this. I am not sure, but i think now there is bb tag, that allows to ignore current font color tint.
I'm a busy man... I have places to go,monsters to kill...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UILabel bbcode Color only modifying existing label color tint?
« Reply #2 on: December 28, 2014, 11:55:56 AM »
Use the [c] tag. That's what removes the default tint color. So do it like so:

  1. Mission time left:
  2. [c][ffffff]30 months[-][/c]