The “enableShadow” and “enableStroke” methods of LabelTTF only appear to work on web exports for Cocos2d-x JS, but perhaps I’m doing something wrong.
To replicate what I’m doing, simply create a new js project.
Then modify the provided app.js
file’s helloLabel object as such:
var helloLabel = new cc.LabelTTF("Hello World", "Arial", 38);
helloLabel.enableShadow(new cc.Color(255, 0, 0), cc.size(3, 3), 3);
or
var helloLabel = new cc.LabelTTF("Hello World", "Arial", 38);
helloLabel.enableStroke(new cc.Color(255, 0, 0), 2);
Upon using cocos run -p win32
neither text effects work.
However, they do work with cocos run -p web
.
Am I doing something wrong?