开发者

Cocos2d score label goes off screen

开发者 https://www.devze.com 2023-03-21 16:46 出处:网络
In my game the score will rise every time you collect a treat, I have positioned the label at the bottom left. The problem is when the score goes up part of the label goes off screen. Any ideas on how

In my game the score will rise every time you collect a treat, I have positioned the label at the bottom left. The problem is when the score goes up part of the label goes off screen. Any ideas on how 开发者_Python百科to fix this.


Try setting the alignment to alignment:UITextAlignmentLeft like so:

        CCLabelTTF *score = [CCLabelTTF labelWithString:@"yeahh" dimensions:CGSizeMake(100, 100) alignment:CCTextAlignmentCenter fontName:@"Marker Felt" fontSize:22];
0

精彩评论

暂无评论...
验证码 换一张
取 消