La barra de progres ja torna a estar com abans

This commit is contained in:
2025-03-06 13:42:52 +01:00
parent 537150365b
commit 68e03ac1b0
3 changed files with 43 additions and 6 deletions

View File

@@ -403,6 +403,7 @@ void Resource::calculateTotal()
AssetType::SOUND,
AssetType::MUSIC,
AssetType::BITMAP,
AssetType::PALETTE,
AssetType::FONT,
AssetType::ANIMATION,
AssetType::TILEMAP,
@@ -431,12 +432,12 @@ void Resource::renderProgress()
auto surface = Screen::get()->getRendererSurface();
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(&rect_wired, stringToColor("blue"));
surface->drawRectBorder(&rect_wired, stringToColor("white"));
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(&rect_full, stringToColor("white"));
Screen::get()->render();
}