How do I change the color of a Cocos2d MenuItem?

Posted by Rob Sawyer on Stack Overflow See other posts from Stack Overflow or by Rob Sawyer
Published on 2009-02-17T19:10:24Z Indexed on 2011/02/06 15:25 UTC
Read the original article Hit count: 198

[MenuItemFont setFontSize:20];
[MenuItemFont setFontName:@"Helvetica"];
//I'm trying to change the color of start (below item)
MenuItem *start = [MenuItemFont itemFromString:@"Start Game" 
                                        target:self 
                                      selector:@selector(startGame:)];
MenuItem *help = [MenuItemFont itemFromString:@"Help"
                                       target:self 
                                     selector:@selector(help:)];
Menu *startMenu = [Menu menuWithItems:start, help, nil];
[startMenu alignItemsVertically];
[self add:startMenu];

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c