create textboard by CCLabelTTF, alignment problem.

create textboard by CCLabelTTF, alignment problem.
0.0 0



My title have a CCLabelTTF as a textboard, and I want to display text from the topleft line by line.
My code is
CCLabelTTF* pLabel = CCLabelTTF::labelWithString(“1st line”,CCSizeMake(320, 480),CCTextAlignmentLeft, “xxx.ttf”, 20);
CCSize size = CCDirector::sharedDirector()>getWinSize;
>setPosition(ccp(size.width / 2, size.height - 10));
that should be ok.

but if I call this code, it will display not I want, (attached file p1.jpg)

I find the CCLabelTTF the 3rd parameter~~ UITextAlignment alignment only have 3 types.

those just horizontal alignment, no vertical alignment options.
what is the better way to solve it?

p1.jpg (3.1 KB)

p0.jpg (2.2 KB)


Here’s the document [[How does CCLabelTTF support line breaks and wrapping]]
issue #363 #357 #355 #351 is done for is feature, but on android #364 is still in progress.