MenuItemFont *start = [MenuItemFont itemFromString:@"Start Game" target:self selector:@selector(startGame:)]; [start.label setRGB:0 :0 :0];
A shortcut is a property of MenuItemFont, a subclass of MenuItem, so you lose it during implicit casting to MenuItem.
Alternatively you can do:
[((MenuItemFont *)start).label setRGB:0 :0 :0]
(but it's ugly, and startMenu will take MenuItemFont without any complaints).
Keep in mind that in most cases colors are hardcoded in MenuItemFont, so calling setIsEnabled sets the colors back to gray or white. This happens around line 239 of MenuItem.m if you need to configure it. If I manage to make a patch to expose this function in MenuItemFont (assuming that this is not in pre-.7.1 sources yet), I will update the message.
Justinb
source share