MCPcopy Create free account
hub / github.com/chrxh/alien / decreaseAlphaForFadeOutLoadingScreen

Method decreaseAlphaForFadeOutLoadingScreen

source/Gui/MainLoopController.cpp:318–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318void MainLoopController::decreaseAlphaForFadeOutLoadingScreen()
319{
320 auto now = std::chrono::steady_clock::now();
321 auto millisecSinceActivation = std::chrono::duration_cast<std::chrono::milliseconds>(now - *_simulationLoadedTimepoint).count();
322 millisecSinceActivation = std::min(FadeOutDuration, millisecSinceActivation);
323 auto alphaFactor = 1.0f - toFloat(millisecSinceActivation) / FadeOutDuration;
324 ImGui::GetStyle().Alpha = alphaFactor;
325}
326
327void MainLoopController::increaseAlphaForFadeInUI()
328{

Callers

nothing calls this directly

Calls 1

toFloatFunction · 0.85

Tested by

no test coverage detected