Welcome,
Guest
. Please
login
or
register
.
December 06, 2024, 02:57:28 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
2.7.0 no linebreak with UILabel
« previous
next »
Print
Pages: [
1
]
Author
Topic: 2.7.0 no linebreak with UILabel (Read 1804 times)
aidji
Guest
2.7.0 no linebreak with UILabel
«
on:
October 03, 2013, 08:58:34 PM »
i just upgraded from 2.5.1 from 2.7.0, i setup my labels by code it was working well with one label for many lines but since the update the linebreak \n is not working anymore
did i missed something? how should i deal with this problem?
Logged
aidji
Guest
Re: 2.7.0 no linebreak with UILabel
«
Reply #1 on:
October 03, 2013, 11:41:29 PM »
well i checked and my last project with older NGUI version dont have this problem, seems that there is a bug or something with label changed?
i have an other panel with translated txt that work correctly for exemple:
tuto7
=
[
SHIELD
]
It protect your \nbody
from
being Hit
!
after being translated into the label display
[
SHIELD
]
It protect your
body
from
being Hit
!
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: 2.7.0 no linebreak with UILabel
«
Reply #2 on:
October 04, 2013, 02:00:20 AM »
You need to do your own string.Replace("\\n", "\n") before setting the label's text. You're feeding it two characters for a newline, when a newline is a single escaped character (\n).
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
2.7.0 no linebreak with UILabel