We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
Can not compute correct label's width or height when its value is 0
Can not compute correct label's width or height when its value is 0
Bug #1430 [Closed]
Status: | Closed | |
---|---|---|
Start date: | 2012-08-15 | |
Priority: | Normal | |
Due date: | ||
Assignee: | zhangxm | |
% Done: | 100% |
|
Category: | all | |
Target version: | cocos2d-2.0-x-2.0.2 |
sample codes
The “label” will only displayed in one line, not convert to more lines according to the width 500.
The reason is that CCLabelTTF::updateTexture will use (0,0) as dimensions when width or height is 0.
So we should only invoke
no matter what the value of dimension is.