I followed the example at http://www.cocos2d-x.org/projects/cocos2d-x/wiki/How_does_CCLabelTTF_support_line_breaks_and_wrapping
but when i set height to 0, the label is not visiable
label = CCLabelTTF::labelWithString(“show ”, CCSizeMake(300, 0), CCTextAlignmentCenter, “Arial”, 9);
I created 4 lables with the following code, but only 3 lablels are visiable, the attachement is the screenshot
CCLabelTTF *label;
// fixed width & fixed heigth, visible
label = CCLabelTTF::labelWithString(“show ”, CCSizeMake(300, 50), CCTextAlignmentCenter, “Arial”, 9);
label~~>setPosition);
addChild;
// fixed width & fixed height, visible
label = CCLabelTTF::labelWithString, CCTextAlignmentCenter, “Arial”, 9);
label~~>setPosition(ccp(0,0));
addChild(label);
// fixed width & dynamic height, invisible
label = CCLabelTTF::labelWithString(“show ”, CCSizeMake(300, 0), CCTextAlignmentCenter, “Arial”, 9);
label~~>setPosition);
addChild;
// dynamic width & dynamic height, visible
label = CCLabelTTF::labelWithString, CCTextAlignmentCenter, “Arial”, 9);
label~~>setPosition(ccp(0,–50));
addChild(label);
Screen Shot 2012-02-17 at 下午5.41.25.png (15.6 KB)