MCPcopy Create free account
hub / github.com/axmolengine/axmol / increaseNumberOfPages

Method increaseNumberOfPages

core/ui/UIPageViewIndicator.cpp:229–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229void PageViewIndicator::increaseNumberOfPages()
230{
231 if (_currentOverlappingIndexNode)
232 {
233 _currentOverlappingIndexNode->setVisible(true);
234 _currentOverlappingIndexNode = nullptr;
235 }
236 Sprite* indexNode;
237
238 if (_useDefaultTexture)
239 {
240 indexNode = utils::createSpriteFromBase64(CIRCLE_IMAGE);
241 }
242 else
243 {
244 switch (_indexNodesTexType)
245 {
246 case Widget::TextureResType::LOCAL:
247 indexNode = Sprite::create(_indexNodesTextureFile);
248 break;
249 case Widget::TextureResType::PLIST:
250 indexNode = Sprite::createWithSpriteFrameName(_indexNodesTextureFile);
251 break;
252 default:
253 return;
254 }
255 }
256
257 indexNode->setColor(_indexNodesColor);
258 indexNode->setScale(_indexNodesScale);
259 indexNode->setOpacity(_indexNodesOpacity);
260 addProtectedChild(indexNode);
261 _indexNodes.pushBack(indexNode);
262}
263
264void PageViewIndicator::decreaseNumberOfPages()
265{

Callers

nothing calls this directly

Calls 7

createSpriteFromBase64Function · 0.85
createFunction · 0.85
pushBackMethod · 0.80
setVisibleMethod · 0.45
setColorMethod · 0.45
setScaleMethod · 0.45
setOpacityMethod · 0.45

Tested by

no test coverage detected