Sometimes, you want a large number of menu choices onscreen at once. In this example, we see the SlidingMenuGrid
class in action.
Execute the following code:
#import "SlidingMenuGrid.h" @implementation Ch5_VertSlidingMenuGrid -(CCLayer*) runRecipe { [super runRecipe]; message.position = ccp(200,270); [self showMessage:@"Tap a button or slide the menu grid up or down."]; //Init item array NSMutableArray* allItems = [[[NSMutableArray alloc] init] autorelease]; /* Create 45 CCMenuItemSprite objects with tags, callback methods and randomized colors */ for (int i = 1; i <= 45; ++i) { CCSprite* normalSprite = [CCSprite spriteWithFile:@"sliding_menu_button_0.png"]; CCSprite* selectedSprite = [CCSprite spriteWithFile:@"sliding_menu_button_1.png"]; ccColor3B color = [self randomColor]; normalSprite.color = color;...