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

Method setPercent

core/ui/UILoadingBar.cpp:261–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261void LoadingBar::setPercent(float percent)
262{
263 if (percent > 100)
264 {
265 percent = 100;
266 }
267 if (percent < 0)
268 {
269 percent = 0;
270 }
271 if (_percent == percent)
272 {
273 return;
274 }
275 _percent = percent;
276
277 if (_totalLength <= 0)
278 {
279 return;
280 }
281
282 this->updateProgressBar();
283}
284
285void LoadingBar::updateProgressBar()
286{

Callers 2

createMethod · 0.45

Calls 1

updateProgressBarMethod · 0.95

Tested by

no test coverage detected