CCMenuitem Multi Line?

Go To StackoverFlow.com

0

Is there a way to make a Menuitem multiline? i tried

CCMenuItemFont mapPacks = [CCMenuItemFont itemFromString:@"Map\n Packs" target:self selector:@selector(mapPacks:)];

but that doesn`t seem to work

2012-04-04 18:13
by Wintersun


2

You forgot to add the '*' after CCMenuItemFont in your code snippet. I use labels for creating multiline items, like this:

CCLabelTTF *label = [CCLabelTTF labelWithString:@"Map\n Packs" dimensions:CGSizeMake(100, 100) 
                                           alignment:UITextAlignmentCenter 
                                           fontName:@"Arial" fontSize:22];
CCMenuItemFont *mapPacks = [CCMenuItemFont itemWithLabel:label target:self selector:@selector(mapPacks:)];
2012-04-06 13:02
by ccscanf
Ads