Search code examples
ioscocos2d-iphonespritebuilder

SpriteBuilder CCButton stretched images?


In spritebuilder, the tool to create UI along with cocos2d, how come whenever I try to add a background image to a CCButton, it appears stretched or altered in some way?

It is hard to explain but after fiddling with every CCButton option for 20 minutes this is the closest I could get it. The first image is the original image and the second in the image in SpriteBuilder.

enter image description here

enter image description here

As you can see in the second image, the edges seem jagged a bit and are curving in the wrong direction. Can anyone explain to me why this is happening and how I can fix this?

Thanks!


Solution

  • I just ended up subclassing CCSprite and just adding my own touch controls to that. Now it looks great!