I tried below two methods to change the color of CCMenuItemFont,but does not work. It's always white.
CCMenuItemFont *gameItem=[CCMenuItemFont itemWithString:@"Game" target:self selector:@selector(goToPlay:)];
[gameItem setColor:ccGRAY];
or
gameItem.color=ccGRAY;
what's the problem?
CCMenuItemFont
is a subclass ofCCMenuItemLabel
. We should actually set the color of theCCLabelTTF
which is added as a child onCCMenuItemFont
orCCMenuItemLabel
. We can actually change item color like this