i write this cpp to extend CCScrollLayer
>
it have scroll indicator of vertical and horizontal.
>
sorry my english is poor!
>
try it,hope it will be useful for you.
The CCScrollLayerExt is not working as expected…
I just create a new Layer as:
@
ScrollLayerExt *scroll = new ScrollLayerExt(CCRect::CCRectMake(0,0,960,640));
this->addChild(scroll);
@
It adds a gray colored layer to the screen but when I swipe on the screen, the layer comes back to the original place after I leave it , even though I have not reached the end of the layer. Any help is appreciated.
The CCScrollLayerExt is not working as expected…
I just create a new Layer as:
@
ScrollLayerExt *scroll = new ScrollLayerExt(CCRect::CCRectMake(0,0,960,640));
this->addChild(scroll);
@
>
It adds a gray colored layer to the screen but when I swipe on the screen, the layer comes back to the original place after I leave it , even though I have not reached the end of the layer. Any help is appreciated.
>
Thanks.
I am having some issues with Creating a CCScrollLayerButton, assigning a tag to it then reading that tag in my callback function.
when i try and get the tag i am getting an EXEC_BAD_ACCESS exception.
I doing the following:
CCScrollLayerButton* levelButton = CCScrollLayerButton::buttonWithFile( “CompleteLevel.png”, this, menu_selector(LevelSelectionScene::callfunc));
levelButton~~>node~~>setTag;
levelButton~~>setAnchorPoint);
levelButton~~>setPosition(GetLevelPosition(3));
layer~~>addChild;
and the callFunc looks as follows:
void LevelSelectionScene::callfunc
{
int tagNum = pSender~~>getTag();
}