I'm having some trouble with the latest CCCropNode in the latest Cocos2d 3.4 beta (all downloaded today). I had problems with creating a CCCropNode, making it crop touches and graphics, when I'm logging when it should crop touches it seems to work but when I add a CCButton within the cropnode I can still press it although it's outside the cropped area, as if the button is getting the priority.
Also, when I wanted to narrow down the problem I stumbled on another problem. What I did was a new Spriter project, added the latest CCCropNode and then the following code:
CCCropNode* c = [CCCropNode node];
[self addChild: c];
CCNodeColor* nc = [CCNodeColor nodeWithColor:[CCColor whiteColor] width:200 height:200];
nc.position = ccp(100,100);
[self addChild: nc];
CCButton* b = [CCButton buttonWithTitle: @"Testing"];
b.position = ccp(100,150);
[self addChild: b];
When I add the CCNodeColor (variable nc) to the CCCropNode (c), then the CCNodeColor (instead of self) gets half the scale for some reason.
Also while I'm at it, in CCCropNode, the touchBegin looks like this:
- (void)touchBegan:(CCTouch *)touch withEvent:(CCTouchEvent *)event
// we only get here if cropping touches is enabled
CCNode *node = nil;
if (self.children.count) node = [self.children objectAtIndex:0];
// if there is a child node, and the touch is outsire, kill the touch
if (node && ![node hitTestWithWorldPos:touch.locationInWorld]) return;
[super touchBegan:touch withEvent:event];
Shouldn't it take _cropNode into regard? As you should be able to force which is the crop node.