pull/33756/head
Cameron Clough 3 weeks ago
parent 8e10c5ad40
commit 21aa937669
  1. 4
      selfdrive/ui/installer/installer.cc

@ -42,10 +42,10 @@ void renderProgress(int progress) {
ClearBackground(BLACK); ClearBackground(BLACK);
DrawText("Installing...", 150, 290, 90, WHITE); DrawText("Installing...", 150, 290, 90, WHITE);
Rectangle bar = {150, 500, (float)GetScreenWidth() - 300, 72}; Rectangle bar = {150, 500, (float)GetScreenWidth() - 300, 72};
DrawRectangleRounded(bar, 0.5f, 10, GRAY); DrawRectangleRounded(bar, 0.25f, 10, (Color){ 41, 41, 41, 255 });
progress = std::clamp(progress, 0, 100); progress = std::clamp(progress, 0, 100);
bar.width *= progress / 100.0f; bar.width *= progress / 100.0f;
DrawRectangleRounded(bar, 0.5f, 10, (Color){ 70, 91, 234, 255 }); DrawRectangleRounded(bar, 0.25f, 10, (Color){ 70, 91, 234, 255 });
DrawText((std::to_string(progress) + "%").c_str(), 150, 600, 70, WHITE); DrawText((std::to_string(progress) + "%").c_str(), 150, 600, 70, WHITE);
EndDrawing(); EndDrawing();
} }

Loading…
Cancel
Save