forked from jaildesigner-jailgames/jaildoctors_dilemma
Ja pinta cosetes per pantalla
This commit is contained in:
@@ -405,16 +405,17 @@ 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();
|
||||
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);
|
||||
Screen::get()->clear(4);
|
||||
|
||||
//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);
|
||||
|
||||
Screen::get()->renderWithoutNotifier();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user