Having problems with cocos2d and menus?
I'm having a problem with xcode when making a menu when using the cocos2d
templates. I put this code in:
if( (self=[super init]) ) {
CCMenuItemImage *item = [CCMenuItemImage
itemWithxNormalImage:@"bug.png" selectedImage:@"bug.png" target:self
selector:@selector(doThis:)];
CCMenu *menu = [CCMenu menuWithItems:item, nil];
[self addChild:menu];
}
return self;
-(void)doThis:(id)sender{}
I put the if statement in the -(id) init method in helloworldlayer.m. If
anyone can help that would be greatly appreciated. I'm having the problem
where everything builds correctly, but the picture doesn't show. I have it
copied to my resources, but when I build it, no picture is shown.
No comments:
Post a Comment