This is how I am defining the button:
CCMenuItemSprite* cubicleOneButton = [CCMenuItemSprite itemFromNormalSprite:[CCSprite spriteWithSpriteFrameName:@"PlayButtonUp.png"]
selectedSprite:[CCSprite spriteWithSpriteFrameName:@"PlayButtonDown.png"]
target:cubicleOneSpace selector:@selector(touched)];
I am then sending the button pointer to a class to manipulate the position and opacity based on some other factors. So all it is doing is reading and modifying the position/opacity value.
I add the button to my _gameLayer:
[_gameLayer addChild:cubicleOneButton z:10000];
Touches are enabled on everything (normally I just use self.isTouchedEnabled...):
'
self.isTouchEnabled = YES;
_gameLayer.isTouchEnabled = YES;
_hud.isTouchEnabled = YES;
`
The _hudLayer responds perfectly to touches, but that uses CCMenuItemImage instead of CCMenuItemSprite.
Does anyone know what I am missing?
Any tips or pointers would be greatly appreciated. :)