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

Method updateProgressBar

core/ui/UILoadingBar.cpp:285–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285void LoadingBar::updateProgressBar()
286{
287 if (_scale9Enabled)
288 {
289 setScale9Scale();
290 }
291 else
292 {
293 float res = _percent / 100.0f;
294 Rect rect = _barRenderer->getTextureRect();
295 rect.size.width = _barRendererTextureSize.width * res;
296 _barRenderer->setTextureRect(rect, _barRenderer->isTextureRectRotated(), rect.size);
297 }
298}
299
300float LoadingBar::getPercent() const
301{

Callers 2

setupTextureMethod · 0.95
setPercentMethod · 0.95

Calls 1

setTextureRectMethod · 0.45

Tested by

no test coverage detected