Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: sintua on January 26, 2015, 05:12:18 PM
-
I use encoding to change colours of the text in a string, but I also need to include [10] and etc in the label, which turns the thing transparent. I can't even escape the encoding with a [[10], and I can't disable encoding because I use it for colour.
Is there an escape character so prevent the label from taking any [##] string and changing it to an alpha? the [any6characters] limitation was mildly obnoxious, but not being able to put 2 characters in brackets is causing problems all throughout my game, not even just this label.
Is there not an escape character for when we actually just want to type a bracket without invoking the encoding?
(http://i.imgur.com/jGcs5vd.png)
-
As far as I know, there isn't one right now, but it doesn't sound like a crazy addition. If you want to quick fix it, you can look into the NGUIText class where the string gets processed and add an escape for now.
-
Just break up the sequence. For example, one of these:
-
Ah, thank you! That should work well! But I would recommend adding the "[[" escape character, it seems to be typical usage in other similar situations, would resolve this kinda problem in a simpler more expected manner :)