iphoneioscocos3dccmenu

how to create menus in cocos3d


I want to create a menu in cocos3d. I failed to find correct solution for this. I tried to create one using the cocos2d concept.

    CCMenuItemImage *item1=[CCMenuItemImage itemFromNormalImage:@"up.png" selectedImage:@"images.jpeg" target:self selector:@selector(up:)];
    CCMenu *mnu1=[CCMenu menuWithItems:item1, nil];
    mnu1.position=ccp(320, 480);
    [self addChild:mnu1];

But there comes an issue,

Incompatible pointer types sending 'CCMenu *' to parameter of type 'CC3Node *'


Solution

  • I found the answer. I had created CCMenu in CCScene. Actually we have to create CCMenu in CCLayer. Now it works !