Last active
April 20, 2016 05:48
-
-
Save ryohey/8591621 to your computer and use it in GitHub Desktop.
create MenuItemLabel in cocos2d-x v3.0beta0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| auto item1 = MenuItemLabel::create(LabelTTF::create("[$200]", "Courier New.ttf", 51), | |
| [](Object *obj) { | |
| CCLOG("item1 touched"); | |
| }); | |
| auto item2 = MenuItemLabel::create(LabelTTF::create("[$500]", "Courier New.ttf", 51), | |
| [](Object *obj) { | |
| CCLOG("item2 touched"); | |
| } | |
| }); | |
| Menu *menu = Menu::create(item1, item2, NULL); | |
| menu->alignItemsHorizontallyWithPadding(10); | |
| addChild(menu); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment