MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / Update

Method Update

ogsr_engine/xrGame/ui/UILoadingScreen.cpp:61–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void UILoadingScreen::Update(const int stagesCompleted, const int stagesTotal)
62{
63 std::scoped_lock<decltype(loadingLock)> lock(loadingLock);
64
65 const float progress = float(stagesCompleted) / stagesTotal * loadingProgress->GetRange_max();
66
67 if (loadingProgress->GetProgressPos() < progress)
68 loadingProgress->SetProgressPos(progress);
69
70 if (loadingProgressPercent)
71 {
72 char buf[5];
73 xr_sprintf(buf, "%.0f%%", loadingProgress->GetProgressPos());
74 loadingProgressPercent->SetText(buf);
75 }
76
77 CUIWindow::Update();
78 Draw();
79}
80
81void UILoadingScreen::ForceFinish()
82{

Callers 1

ForceFinishMethod · 0.45

Calls 4

UpdateFunction · 0.85
DrawFunction · 0.85
SetProgressPosMethod · 0.80
SetTextMethod · 0.45

Tested by

no test coverage detected