Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: xbelt on August 18, 2014, 02:49:26 PM

Title: Problem with BB-code in UILabel
Post by: xbelt on August 18, 2014, 02:49:26 PM
Hello,

I have a weird problem. I use heavy formatting with BB-codes but there seems to be a problem when formatting an opening bracket ('[').
If I have the following text in a UILabel:

  1. [008066]make[-] [0000FF]"[-][000000]col[-] [0000FF]1[-] [008066]setpw[-] [0000FF]:[-][000000]w[-] [008066]repeat[-] [0000FF]17[-] [000000][[-]  [008066]setpc[-]

Everything is correctly formatted except the '[' is not visible. The background of the label is somewhat grey
I hope someone can help me

Lukas
Title: Re: Problem with BB-code in UILabel
Post by: niall on August 19, 2014, 08:31:01 AM
You mean the black [ that comes after the 17?  I copy pasted that into a UILabel here and I can see it just fine?  Try creating a new label perhaps?
Title: Re: Problem with BB-code in UILabel
Post by: ArenMook on August 19, 2014, 01:43:57 PM
Make sure your NGUI is up to date as well.
Title: Re: Problem with BB-code in UILabel
Post by: xbelt on August 25, 2014, 04:09:23 AM
I Am sorry it took me so long but I updated NGUI, created a new label and inserted the following text:
  1. [008066]to[-] [000000]test[-]
  2. [008066]repeat[-] [0000FF]12[-] [000000][[-] [008066]fd[-] [0000FF]100[-] [008066]rt[-] [0000FF]90[-] [000000]][-]
  3. [008066]end[-]
the result looks like:
http://puu.sh/b73EU/c409e70880.png
so the opening bracket is missing. These are the settings set on the label:
http://puu.sh/b73G1/3ab75aed4f.png

If I change the text to:
  1. [008066]to[-] [000000]test[-]
  2. [008066]repeat[-] [0000FF]12[-] [000000][ [-] [008066]fd[-] [0000FF]100[-] [008066]rt[-] [0000FF]90[-] [000000]][-]
  3. [008066]end[-]
(Adding a white space after the '[')
it works
Title: Re: Problem with BB-code in UILabel
Post by: ArenMook on August 26, 2014, 01:53:19 AM
Thanks, it's a bug. I've fixed it on my end so it will be fixed in the next update.