MenuItem *pageMenuItem;
pageMenuItem = MenuItemImage::create(menuImgNm, menuImgNm,
CC_CALLBACK_1(RootLayer::buttonAction, this));
我想根据某些条件更改图像。
答案 0 :(得分:1)
我想你可以这样试试:
CCTexture2D* tex = [[CCTextureCache sharedTextureCache] addImage:@"new_image_name"];
[menuImgNm setTexture: tex];
希望这有帮助!