function my_button(me,picname,txt,x,y,X,Y,func)
{
var textButton = new ccui.Button();
textButton.setTouchEnabled(true);
//textButton.loadTextures("res/mask.jpg", "res/mask.jpg", "");
textButton.loadTextures(picname, picname,picname);
textButton.setTitleText (txt);
//textButton.LayerColor(cc.color(255, 32, 32, 128));
textButton.x = x; //size.width / 2;
textButton.y = y; //size.height / 2;
textButton.scaleX=X;
textButton.scaleY=Y;
textButton.addTouchEventListener(function(sender,type){
//cc.log("touched2: sender:"+sender+" type:"+type);
//if(type==0)cc.log("pressed");
if(type==0)if(typeof func=="function")func();
},this);
me.addChild(textButton);
return textButton
}
in this function that i made i don’t know what to do to change the color of the text
for now it automatically gives white what can i do pleas help