I upgraded an old project and saw the incompatibility of cocos2d 2.0 and the CCScrollView class.
Is there an update available (last update I can find is feb 2011) or any other good library for doing sideways scrolling?
A fast, easy to use, free, and community supported 2D game engine
I upgraded an old project and saw the incompatibility of cocos2d 2.0 and the CCScrollView class.
Is there an update available (last update I can find is feb 2011) or any other good library for doing sideways scrolling?
*Bump* No one using cocos2d 2.0 with a CCScrollView (or similar)?
I use the SWTableView (which uses SWScrollView) class, modified a bit in 2.0.
I have now fixed most problems. But I still have this warning: Implicit declaration of function 'glClipPlanef' is invalid in C99
Any ideas how to get rid of it?
I switched up glClipPlanef for plain old glScissor which seems to work well.
-(void)beforeDraw {
if (clipsToBounds_) {
glEnable(GL_SCISSOR_TEST);
const CGFloat s = [[CCDirector sharedDirector] contentScaleFactor];
CGPoint worldPosition = [self convertToWorldSpace:CGPointZero];
glScissor(worldPosition.x*s, worldPosition.y*s, viewSize_.width*s, viewSize_.height*s);
}
}
// * retract what's done in beforeDraw so that there's no side effect to
// * other nodes.
-(void)afterDraw {
if (clipsToBounds_) {
glDisable(GL_SCISSOR_TEST);
}
}Thanks! That fixed my problems.
You must log in to post.