To make a menu, write this in your if statement in your init block:
//This first line adds a Image to the menu (mine is item1) itemFromNormalImage is what you want the picture to look like before you click it, and selected image is what you want the picture/button to look like when you click it (you can make these the same if you want to)
CCMenuItemImage *item1 = [CCMenuItemImage itemFromNormalImage:@"buttonplay.png" selectedImage:@"buttonplay2.png"
//target:self means look in the return self; class. selector:@selector is where the method is located, and doThis is just the name of the mathod that is going to be called whenever you click the button
target:self selector:@selector(doThis:)];
//CCMenu menu = menuwithitems: item1, nil means:
//The menu is named: menu, and these are the items i want in it. nil signifies the end of the //items
CCMenu *menu = [CCMenu menuWithItems:item1, nil];
//self addChild means: add this menu to the scene, easily enough
[self addChild:menu];
CCMenuItemImage *item1 = [CCMenuItemImage itemFromNormalImage:@"buttonplay.png" selectedImage:@"buttonplay2.png"
target:self selector:@selector(doThis:)];
CCMenu *menu = [CCMenu menuWithItems:item1, nil];
[self addChild:menu];
If you get any errors, please tell me. First time a made a menu i got a lot of errors.
Ex: i forgot to write @ before the filname.
Ex: i forgot ;