Creating a vertical sliding menu grid
Sometimes, you want a large number of menu choices onscreen at once. In this example, we see the SlidingMenuGrid
class in action.
Getting ready
Please refer to the project RecipeCollection02 for full working code of this recipe.
How to do it...
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 ...
Get Cocos2d for iPhone 1 Game Development Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.