File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -114,8 +114,11 @@ cc.LabelBMFont = cc.Node.extend(/** @lends cc.LabelBMFont# */{
114
114
} ,
115
115
116
116
_setString : function ( newString , needUpdateLabel ) {
117
- this . _initialString = newString ;
118
- this . _string = newString ;
117
+ if ( ! needUpdateLabel ) {
118
+ this . _string = newString ;
119
+ } else {
120
+ this . _initialString = newString ;
121
+ }
119
122
120
123
var locChildren = this . _children ;
121
124
if ( locChildren ) {
@@ -561,7 +564,8 @@ cc.LabelBMFont = cc.Node.extend(/** @lends cc.LabelBMFont# */{
561
564
*/
562
565
updateLabel : function ( ) {
563
566
var self = this ;
564
- self . _string = self . _initialString ;
567
+ self . string = self . _initialString ;
568
+
565
569
var i , j , characterSprite ;
566
570
// process string
567
571
// Step 1: Make multiline
You can’t perform that action at this time.
0 commit comments