I have this ActionScript 3 TextFormat settings:
textFormat = new TextFormat();
textFormat.size = 15;
textFormat.font = "Arial";
textFormat.color = 0x000000;
textFormat.align = TextFormatAlign.CENTER;
buttonText = new TextField();
buttonText.selectable = false;
buttonText.defaultTextFormat = textFormat;
buttonText.mouseEnabled = false;
buttonText.tabEnabled = false;
buttonText.x = 2;
buttonText.y = 2;
buttonText.width = 65;
buttonText.height = 25;
buttonText.text = btnText;
btnRect.addChild(buttonText);
I tried this as per this page Phaser.Text:
textStyleBasicButton = {
font: 'normal 15pt Arial',
align: 'center',
fontStyle: 'normal',
fontSize: 15,
fontWeight: 'normal',
fill: '#000000',
tabs: 0,
testString: 'should be 65px wide and 25px high'
};
But I am not sure about the test string and about tabs. Is it ok?
Also it would become selectable only if inputEnabled is set to true?