首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Cocos2d-iphone显示边框

Cocos2d-iphone显示边框
EN

Stack Overflow用户
提问于 2013-09-08 09:54:58
回答 1查看 607关注 0票数 1

如何不使用任何框架来显示边框。只是普通的cocos2d?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-09-08 10:41:37

在Cocos2d中非常酷的特性,搜索ccConfig.h,您可以在这里找到以下部分:

代码语言:javascript
复制
/** @def CC_SPRITE_DEBUG_DRAW
If enabled, all subclasses of CCSprite will draw a bounding box.
Useful for debugging purposes only. It is recommended to leave it disabled.

If the CCSprite is being drawn by a CCSpriteBatchNode, the bounding box might be a bit different.
To enable set it to a value different than 0. Disabled by default:
0 -- disabled
1 -- draw bounding box
2 -- draw texture box
*/
#ifndef CC_SPRITE_DEBUG_DRAW
#define CC_SPRITE_DEBUG_DRAW 0
#endif

将行#define CC_SPRITE_DEBUG_DRAW0更改为1。每一个CCSprite,所以CCLabelTTF现在也有一个白色的发际线边框。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18682422

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档