CCMenuItemSprite* nextButton;
...
nextButton.contentSize = CGSizeMake(nextButton.boundingBox.size.width + 1000, nextButton.boundingBox.size.height);
[[[nextButton children] objectAtIndex:0] setAnchorPoint:ccp(1,0.5)];
[[[nextButton children] objectAtIndex:1] setAnchorPoint:ccp(1,0.5)];
[[[nextButton children] objectAtIndex:0] setPosition:ccp(nextButton.contentSize.width, nextButton.contentSize.height/2)];
[[[nextButton children] objectAtIndex:1] setPosition:ccp(nextButton.contentSize.width, nextButton.contentSize.height/2)];
source: http://stackoverflow.com/questions/5622390/cocos2d-extend-touch-area-from-a-button
keywords: ccmenuitem bigger contentsize
source: http://stackoverflow.com/questions/5622390/cocos2d-extend-touch-area-from-a-button
keywords: ccmenuitem bigger contentsize
No comments:
Post a Comment