Merge pull request #6874 from HoGarfield/CCMenuLoader_v3

The default size of CCMenu in CocosBuilder is 0,0
This commit is contained in:
minggo 2014-05-26 03:34:13 -05:00
commit f619c096da
1 changed files with 8 additions and 1 deletions

View File

@ -24,7 +24,14 @@ public:
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(MenuLoader, loader);
protected:
CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(cocos2d::Menu);
virtual cocos2d::Menu * createNode(cocos2d::Node * pParent, cocosbuilder::CCBReader * ccbReader)
{
cocos2d::Menu * pMenu = cocos2d::Menu::create();
pMenu->setContentSize(cocos2d::Size::ZERO);
return pMenu;
}
};
}