@@ -24,13 +24,8 @@ function createExample() {
2424
2525
2626 var colorLabel = new ns_egret . TextField ( ) ;
27- < << << << HEAD
28- // colorLabel.setContentSize(0, 0);
29- colorLabel . textColor = "#ff0000" ;
30- = === ===
3127// colorLabel.width = colorLabel.height = 0;
3228 colorLabel . textColor = 0xff0000 ;
33- > >>> >>> refactor
3429 colorLabel . textAlign = "left" ;
3530 colorLabel . text = "这是一段居左的文字\n可以支持多行" ;
3631 container . addChild ( colorLabel ) ;
@@ -39,14 +34,9 @@ function createExample() {
3934 var colorLabel = new ns_egret . TextField ( ) ;
4035 colorLabel . x = 0 ;
4136 colorLabel . y = 100 ;
42- < << << << HEAD
43- colorLabel . setContentSize ( 120 , 0 ) ;
44- colorLabel . textColor = "#ff0000" ;
45- = === ===
4637 colorLabel . width = 120 ;
4738 colorLabel . height = 0 ;
4839 colorLabel . textColor = 0xff0000 ;
49- > >>> >>> refactor
5040 colorLabel . textAlign = "center" ;
5141 colorLabel . text = "这是一段居中的文字,宽度设置120,字号设置30px,所以正好显示4个" ;
5242 container . addChild ( colorLabel ) ;
@@ -55,16 +45,10 @@ function createExample() {
5545 var colorLabel = new ns_egret . TextField ( ) ;
5646 colorLabel . x = 400 ;
5747 colorLabel . y = 250 ;
58- < << << << HEAD
59- colorLabel . setContentSize ( 160 , 0 ) ;
60- colorLabel . relativeAnchorPointX = 1 ;
61- colorLabel . textColor = "#FFFFFF" ;
62- = === ===
6348 colorLabel . width = 160 ;
6449 colorLabel . height = 0 ;
6550 colorLabel . relativeAnchorPointX = 1 ;
6651 colorLabel . textColor = 0xFFFFFF ;
67- > >>> >>> refactor
6852 colorLabel . textAlign = "right" ;
6953 colorLabel . text = "这个文字居右对齐" ;
7054 container . addChild ( colorLabel ) ;
@@ -74,15 +58,9 @@ function createExample() {
7458 var strokeLabel = new ns_egret . TextField ( ) ;
7559 strokeLabel . x = 400 ;
7660 strokeLabel . y = 20 ;
77- < << << << HEAD
78- strokeLabel . textColor = "#FFFFFF" ;
79- strokeLabel . text = "描边" ;
80- strokeLabel . strokeColor = "#FF0000" ;
81- = === ===
8261 strokeLabel . textColor = 0xFFFFFF ;
8362 strokeLabel . text = "描边" ;
8463 strokeLabel . strokeColor = 0xFF0000 ;
85- > >>> >>> refactor
8664 strokeLabel . stroke = 2 ;
8765 container . addChild ( strokeLabel ) ;
8866
0 commit comments