canvi de pc

This commit is contained in:
2025-03-05 07:44:12 +01:00
parent 57481a1e97
commit 33038e8509
23 changed files with 173 additions and 164 deletions

View File

@@ -405,17 +405,16 @@ void Resource::renderProgress()
constexpr int BAR_HEIGHT = 10;
const int bar_position = options.game.height - BAR_HEIGHT - Y_PADDING;
Screen::get()->start();
Screen::get()->clear(4);
Screen::get()->clearSurface();
auto surface = std::make_shared<Surface>(Screen::get()->getRenderSurfaceData(), 1, 1);
const int wired_bar_width = options.game.width - (X_PADDING * 2);
SDL_Rect rect_wired = {X_PADDING, bar_position, wired_bar_width, X_PADDING};
surface->fillRect(Screen::get()->getRenderSurfaceData(), &rect_wired, stringToColor("blue"));
//SDL_SetRenderDrawColor(Screen::get()->getRenderer(), 255, 255, 255, 255);
//
//const int wired_bar_width = options.game.width - (X_PADDING * 2);
//SDL_Rect rect_wired = {X_PADDING, bar_position, wired_bar_width, X_PADDING};
//SDL_RenderDrawRect(Screen::get()->getRenderer(), &rect_wired);
//
//const int full_bar_width = wired_bar_width * count_.getPercentage();
//SDL_Rect rect_full = {X_PADDING, bar_position, full_bar_width, X_PADDING};
//SDL_RenderFillRect(Screen::get()->getRenderer(), &rect_full);
const int full_bar_width = wired_bar_width * count_.getPercentage();
SDL_Rect rect_full = {X_PADDING, bar_position, full_bar_width, X_PADDING};
surface->fillRect(Screen::get()->getRenderSurfaceData(), &rect_full, stringToColor("white"));
Screen::get()->renderWithoutNotifier();
}