I am trying to create a label with top vertical alignment. Meaning the first line of the label is always at the same y position, and the text expands downward. The horizontal alignment works, but the middle of the text label is always at the same y position regardless of number of lines.
var label = cc.LabelTTF.create(msg, 'Arial', 32, cc.TEXT_ALIGNMENT_LEFT, cc.VERTICAL_TEXT_ALIGNMENT_TOP);
I also tried leaving the alignments undefined in the constructor and setting the alignment either before or after setting the position of the label:
label.setHorizontalAlignment(hAlign);
label.setVerticalAlignment(vAlign);
label.x = pos.x;
label.y = pos.y;
and
label.x = pos.x;
label.y = pos.y;
label.setHorizontalAlignment(hAlign);
label.setVerticalAlignment(vAlign);
But the text is always vertically centered.