有没有办法制作 Menuitem 多行?我试过了
CCMenuItemFont mapPacks = [CCMenuItemFont itemFromString:@"Map\n Packs" target:self selector:@selector(mapPacks:)];
但这似乎不起作用
有没有办法制作 Menuitem 多行?我试过了
CCMenuItemFont mapPacks = [CCMenuItemFont itemFromString:@"Map\n Packs" target:self selector:@selector(mapPacks:)];
但这似乎不起作用
您忘记在代码片段中的 CCMenuItemFont 之后添加“*”。我使用标签来创建多行项目,如下所示:
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:)];