The default size of CCMenu in CocosBuilder is 0,0

This commit is contained in:
garfield_ho 2014-05-22 16:21:51 +08:00
parent 918a48054a
commit d5d0df6933
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;
}
};
}