If you only want to using the pickerview function, I suggest you can use the cocos2d extensions, just implement your self. It is so easy to have self cross-platform PickerView.
I finally made my own picker view control using CCTableview and CCButton.
however it looks CCTableview scroll is not behaving properly if it’s width kept same as parent layer i had to reduce the size by 100 to make it work correctly
any inputs on who to select size of CCTableView when it’s parent layer is not full screen it’s small popup window
Actually you maybe don’t something wrong. The CCTableview in Android will work correctly. Can you post some code what you are writing?
Maybe it is not the CCTableview problem.
If you really confuse of CCTableview, you can make with CCScrollview and control the resource loading with for loop, and handle the CCTouchDisaptch delegate, to control the scrollview content how to scroll , something like page enable in UIScrollview.
}
void LevelScene::homeClicked
{
switch
{
case CCControlEventTouchUpInside:
CCDirector::sharedDirector~~>popScene;
break;
}
}
/***
** cell height for a given table.
*
* `param table table to hold the instances of Class
return cell size **/ CCSize LevelScene::cellSizeForTable { return CCSizeMake; } /**\* \* a cell instance at a given index \* \*param idx index to search for a cell
`return cell found at idx /
CCTableViewCell LevelScene::tableCellAtIndex
{
CCTableViewCell * mCell = table~~>dequeueCell;
if
{
mCell = new CCTableViewCell;
mCell~~>autorelease();
}
else
{
mCell~~>removeAllChildrenWithCleanup;
}
CCSprite * mBackSprite;
mBackSprite = CCSprite::create;
mBackSprite~~>setPosition(CCPointMake(0,15));
mBackSprite>setAnchorPoint(CCPointZero);
@Victor Desuza, I got my code for picker view working perfect now size and scrolling issue is also resolved.
I am writing a sample code for picker view I will share soon.
any sample to check this ui picker view kind component in cocos2d-x??
digish pandya wrote:
@Victor Desuza, I got my code for picker view working perfect now size and scrolling issue is also resolved.
I am writing a sample code for picker view I will share soon.