Skip to content

Instantly share code, notes, and snippets.

@harusou-apps
Created August 23, 2013 23:32
Show Gist options
  • Select an option

  • Save harusou-apps/6324977 to your computer and use it in GitHub Desktop.

Select an option

Save harusou-apps/6324977 to your computer and use it in GitHub Desktop.
CCMenuITemを縦横等間隔に並べる ref: http://qiita.com/yokada3/items/b699bd4a26638e9815ed
CGSize size = [[CCDirector sharedDirector] winSize];
CCMenu* menu2 = [CCMenu menuWithItems:itemGameCenter, itemTwitter, itemFacebook, nil];
menu2.position = ccp(size.width / 2 , size.height / 3);
[menu2 alignItemsHorizontallyWithPadding:64.0f];
CGSize size = [[CCDirector sharedDirector] winSize];
CCMenu* menu = [CCMenu menuWithItems:itemStart, itemHowtoplay, nil];
menu.position = ccp(size.width / 2 , size.height / 2);
[menu alignItemsVerticallyWithPadding:32.0f];
CCSize winSize = CCDirector::sharedDirector()->getWinSize();
CCMenu* pMenu = CCMenu::create(pStartItem, pStartRecord, pEtcGameItem, NULL);
pMenu->setPosition(ccp(winSize.width / 2, winSize.height / 2));
pMenu->alignItemsVerticallyWithPadding(30.0f);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment