ban*_*anu 5 iphone cocos2d-iphone ios4
我目前正在为我的游戏使用Cocos2d FrameWork.我需要在CCLabelTTF中更改背景颜色.我知道如何设置字体颜色,有人可以告诉我如何更改CCLabelTTF对象的背景颜色.
CCLabelTTF *nameLabel=[CCLabelTTF labelWithString:[NSString stringWithFormat:@"%@",[plyName objectAtIndex:i]] fontName:@"Arial" fontSize:20];
nameLabel.position=ccp(100,y1);
nameLabel.color=ccc3(245, 222, 179);
[self addChild:nameLabel];
Run Code Online (Sandbox Code Playgroud)
这是我添加Label的示例代码.有任何想法吗?
| 归档时间: |
|
| 查看次数: |
7524 次 |
| 最近记录: |