Skip to content

Commit 18265fe

Browse files
committed
Merge pull request #1578 from pandamicro/button
Fix #1389 : Add enableStroke to cc.Label
2 parents 87f3b7f + 772ec0a commit 18265fe

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

frameworks/js-bindings/bindings/script/jsb_cocos2d.js

+5
Original file line numberDiff line numberDiff line change
@@ -2799,3 +2799,8 @@ cc.LabelTTF.prototype.setDimensions = function (dim, height) {
27992799
}
28002800
this._setDimensions(dim);
28012801
};
2802+
2803+
//
2804+
// Label enableStroke
2805+
//
2806+
cc.Label.prototype.enableStroke = cc.Label.prototype.enableOutline;

samples/js-tests/src/GUITest/UIButtonTest/UIButtonTest.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -442,10 +442,7 @@ var UIButtonTitleEffectTest = UIScene.extend({
442442
button2.setNormalizedPosition(0.8, 0.5);
443443
button2.setTitleText("PLAY GAME");
444444
var title2 = button2.getTitleRenderer();
445-
if(cc.sys.isNative)
446-
title2.enableOutline(cc.color.GREEN, 3);
447-
else
448-
title2.enableStroke(cc.color.GREEN, 3);
445+
title2.enableStroke(cc.color.GREEN, 3);
449446
this.addChild(button2);
450447
return true;
451448
}

0 commit comments

Comments
 (0)