Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: shokinhan on August 19, 2013, 08:41:33 AM
-
The version before has the "\n" function.
But now it does't support. why?
The change would make a lot of troubles. Because my text already has a lot of "\n" for editing the text!
-
What do you mean "again"? It was never re-added. You probably re-added it yourself.
You need to fix your own text to not include two characters for \n. Newline is a single character.
-
I do it as so!
I add an line code as "mProcessedText = mText.Replace("\\n", "\n");", is it right?
void ProcessText ()
{
mChanged = true;
hasChanged = false;
mLastText = mText;
mProcessedText = mText.Replace("\\n", "\n");
...............................................
}
-
I do it as so!
I add an line code as "mProcessedText = mText.Replace("\\n", "\n");", is it right?
void ProcessText ()
{
mChanged = true;
hasChanged = false;
mLastText = mText;
mProcessedText = mText.Replace("\\n", "\n");
...............................................
}
Why are you doing this ? I set the UILabel.text property and include \n for a newline and it works just fine using stock 2.6.4
-
For some obscure reason he keeps insisting on passing strings that use double characters for a newline instead of a single character. So instead of fixing his text, he prefers to hack the label. *shrug*
-
So if I want to mark the newline at file like 1.txt. And the program would read the file.
How to mark an newline in the file?
-
When you read your file, do the string.Replace before assigning it to your label.text.