Hi everyone, I’m new here. I am experimenting with progress bars and it seems that cocos2d-x doesn’t have a lot of the same progress timer types that cocos2d-iphone has. Currently my code is this:
CCSprite *sp = CCSprite::spriteWithFile("Images/UI/loadbar.png"); loadingBar = CCProgressTimer::progressWithSprite(sp); loadingBar->setType(CCProgressTimerType::kCCProgressTimerTypeBar); loadingBar->setAnchorPoint(ccp(0,0)); loadingBar->setPositionX(size.width - sp->getContentSize().width); loadingBar->setMidpoint(ccp(0,0));
CCProgressTo *progressTo = CCProgressTo::actionWithDuration(0.5f,100); loadingBar->runAction(progressTo);
However, this causes my loading bar image to scale to full size, rather than appearing form left to right. How would you accomplish this in cocos2d-x?