I can’t find CCTableView control in cocosbuilder 3.0 beta
How to add CCTableView control using cocosbuilder?
thanks
I can’t find CCTableView control in cocosbuilder 3.0 beta
How to add CCTableView control using cocosbuilder?
thanks
I see couple solutions for that:
# use simple CCNode in CocosBuilder, place it as you wish. Fill its custom class field with “CCTableView”. Define Loader for this class in your code. It works.
# create plugin for CocosBuilder
I use first of them, but second one looks more preferable.
Hi Fedor:
Would you please explain more detail about how to make CCTableView with CocosBuilder? I am new to CocosBuilder and I have hard time to make CCTableView work with it.
Thanks
Fedor Shubin wrote:
I see couple solutions for that:
# use simple CCNode in CocosBuilder, place it as you wish. Fill its custom class field with “CCTableView”. Define Loader for this class in your code. It works.
# create plugin for CocosBuilder
>
I use first of them, but second one looks more preferable.
Hi Emmy,
There is my example for CCListView class:
# put CCNode to your scene in CB
# define “Custom class” property to “CCListView”
# in code define class:
class CCListViewLoader : public CCLayerColorLoader {
public:
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCListViewLoader, loader);
protected:
virtual CCListView * createCCNode(cocos2d::CCNode * pParent, cocos2d::extension::CCBReader * pCCBReader) {
CCListView *pRet = CCListView::create(CCListViewModeHorizontal);
return pRet;
}
};
# somewhere before nodes are loaded:
CCNodeLoaderLibrary *pCCNodeLoaderLibrary = CCNodeLoaderLibrary::sharedCCNodeLoaderLibrary();
V_REGISTER_LOADER_GLUE(pCCNodeLoaderLibrary, CCListView);
where V_REGISTER_LOADER_GLUE:
#define V_REGISTER_LOADER_GLUE(NODE_LIBRARY, CLASS) NODE_LIBRARY->registerCCNodeLoader(#CLASS, CLASS##Loader::loader())
I hope it’s not too confusing.
good, so I worked like Fedor’s way
Fedor Shubin wrote:
Hi Emmy,
>
There is my example for CCListView class:
>
# put CCNode to your scene in CB
# define “Custom class” property to “CCListView”
# in code define class:
[…]
# somewhere before nodes are loaded:
[…]
where V_REGISTER_LOADER_GLUE:
[…]
>
I hope it’s not too confusing.