diff --git a/source/Gui/OverlayController.cpp b/source/Gui/OverlayController.cpp index 818176fb3..817ac32a4 100644 --- a/source/Gui/OverlayController.cpp +++ b/source/Gui/OverlayController.cpp @@ -30,7 +30,7 @@ void OverlayController::process() if (!_on) { return; } - processLoadingBar(); + processProgressAnimation(); if (!_show) { return; @@ -52,7 +52,7 @@ void OverlayController::setOn(bool value) _on = value; } -void OverlayController::processLoadingBar() +void OverlayController::processProgressAnimation() { if (_persisterFacade->isBusy()) { if (!_progressBarRefTimepoint.has_value()) { @@ -68,6 +68,34 @@ void OverlayController::processLoadingBar() auto height = scale(15.0f); auto center = ImVec2{viewSize.x / 2, viewSize.y - scale(60.0f)}; + drawList->AddRectFilledMultiColor( + ImVec2{center.x - width, center.y - height * 5}, + ImVec2{center.x, center.y + height}, + ImColor::HSV(0.66f, 1.0f, 0.1f, 0.0f), + ImColor::HSV(0.66f, 1.0f, 0.1f, 0.0f), + ImColor::HSV(0.66f, 1.0f, 0.1f, 1.0f), + ImColor::HSV(0.66f, 1.0f, 0.1f, 0.0f)); + drawList->AddRectFilledMultiColor( + ImVec2{center.x, center.y - height * 5}, + ImVec2{center.x + width, center.y + height}, + ImColor::HSV(0.66f, 1.0f, 0.1f, 0.0f), + ImColor::HSV(0.66f, 1.0f, 0.1f, 0.0f), + ImColor::HSV(0.66f, 1.0f, 0.1f, 0.0f), + ImColor::HSV(0.66f, 1.0f, 0.1f, 1.0f)); + drawList->AddRectFilledMultiColor( + ImVec2{center.x, center.y + height}, + ImVec2{center.x + width, center.y + height * 6}, + ImColor::HSV(0.66f, 1.0f, 0.1f, 1.0f), + ImColor::HSV(0.66f, 1.0f, 0.1f, 0.0f), + ImColor::HSV(0.66f, 1.0f, 0.1f, 0.0f), + ImColor::HSV(0.66f, 1.0f, 0.1f, 0.0f)); + drawList->AddRectFilledMultiColor( + ImVec2{center.x - width, center.y + height}, + ImVec2{center.x, center.y + height * 6}, + ImColor::HSV(0.66f, 1.0f, 0.1f, 0.0f), + ImColor::HSV(0.66f, 1.0f, 0.1f, 1.0f), + ImColor::HSV(0.66f, 1.0f, 0.1f, 0.0f), + ImColor::HSV(0.66f, 1.0f, 0.1f, 0.0f)); auto N = 6 + toInt(powf(sinf(duration / 500.0f - Const::Pi / 4) + 1, 3.0f) * 5); for (int i = 0; i < N; ++i) { auto amplitude1 = sinf(toFloat(i) * 10.0f / toFloat(N) - duration / 700.0f * (1.0f + 0.3f * sinf(duration / 1000))); @@ -79,7 +107,7 @@ void OverlayController::processLoadingBar() drawList->AddRectFilled( ImVec2{center.x - width / 2 + toFloat(i) / N * width, std::min(y1, y2)}, ImVec2{center.x - width / 2 + toFloat(i + 1) / N * width - scale(3), std::max(y1, y2)}, - ImColor::HSV(0.625, 0.8f, 0.55f, 0.6f)); + ImColor::HSV(0.625f, 0.8f, 0.55f, 0.6f)); } drawList->AddText( StyleRepository::get().getReefMediumFont(), diff --git a/source/Gui/OverlayController.h b/source/Gui/OverlayController.h index ffd5cd47f..c49a20c5d 100644 --- a/source/Gui/OverlayController.h +++ b/source/Gui/OverlayController.h @@ -19,7 +19,7 @@ class OverlayController void setOn(bool value); private: - void processLoadingBar(); + void processProgressAnimation(); void processMessage(); PersisterFacade _persisterFacade;