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

Method copySpecialProperties

core/ui/UILoadingBar.cpp:407–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

405}
406
407void LoadingBar::copySpecialProperties(Widget* widget)
408{
409 LoadingBar* loadingBar = dynamic_cast<LoadingBar*>(widget);
410 if (loadingBar)
411 {
412 _prevIgnoreSize = loadingBar->_prevIgnoreSize;
413 setScale9Enabled(loadingBar->_scale9Enabled);
414
415 // clone the inner sprite: https://github.com/cocos2d/cocos2d-x/issues/16930
416 loadingBar->_barRenderer->copyTo(_barRenderer);
417 setupTexture();
418
419 setCapInsets(loadingBar->_capInsets);
420 setPercent(loadingBar->_percent);
421 setDirection(loadingBar->_direction);
422 _textureFile = loadingBar->_textureFile;
423 _totalLength = loadingBar->_totalLength;
424 _barRendererTextureSize = loadingBar->_barRendererTextureSize;
425 }
426}
427
428ResourceData LoadingBar::getRenderFile()
429{

Callers

nothing calls this directly

Calls 3

setupTextureFunction · 0.85
setDirectionFunction · 0.50
copyToMethod · 0.45

Tested by

no test coverage detected