Hi all Im just creating a menu for an iphone app using cocos2d CCMenuItem. Now i havent been using cocos2d that long so i may be doing this completely arse ways so hopefully someone can point me in the right direction.
CCMenuItem *mainMenuItem = [CCMenuItemImage itemFromNormalImage:@"Main Menu Up.png" selectedImage:@"Main Menu Down.png"
target:self
selector:@selector(back:)];
CCMenu *soundMenu = [CCMenu menuWithItems:mainMenuItem, nil];
now this is fine and all works well but lets say i have a large amount of menu buttons to add do i have to add them all in this way or is it possible to create an nsmutablearray and add all the menu items to it and then add the array to soundmenu all in one go.
NSRange range = NSMakeRange(1, 10);
id *buffer = malloc(10 * sizeof(id));
CCMenu *soundMenu = [CCMenu menuWithItems:[myKeyboard getObjects:buffer range:range],nil];
like something like that? now of course this aint working for me im getting an invalid use of void expression error. Im not even sure its even possible to to do what i was trying so any tips would be greatly appreciated.
Also i need to create a custom keyboard using cocos2d if anyone has any tips or advice on that would be much appreciate. I havent really had much luck using google i keep getting code for using Interface Builder which im not a fan of. Is there a way of creating a keyboard just using cocos2d? Thanks all G