Buttons and menus
are on the screen, but nothing happens when the buttons are pressed:
CCMenuItemImage *menuB = [CCMenuItemImage itemFromNormalImage:@"menuB.png" selectedImage:@"menuB.png" target:self selector:@selector(goMenu:)]; CCMenuItemImage *tryAgainB = [CCMenuItemImage itemFromNormalImage:@"tryAgainB.png" selectedImage:@"tryAgainB.png" target:self selector:@selector(tryAgain:)]; CCMenuItemImage *menuGoodByeT = [CCMenuItemImage itemFromNormalImage:@"menu.png" selectedImage:@"menu.png" target:self selector:@selector(nothing:)]; menuB.position=ccp(-65,-40); tryAgainB.position=ccp(15,-40); menu = [CCMenu menuWithItems:menuGoodByeT,menuB,tryAgainB, nil]; menu.isTouchEnabled = YES; [self addChild: menu];
yes, the method has: id sender .
What is wrong with this menu? these are some, as always there are problems.
source share