Darken screen correctly on challenge home.

This commit is contained in:
Steve 2018-12-31 16:46:44 +00:00
parent 5f15797043
commit d4f4fdb0c8
1 changed files with 8 additions and 5 deletions

View File

@ -308,6 +308,14 @@ static void draw(void)
drawStars();
if (show == SHOW_MENU)
{
SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_BLEND);
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 128);
SDL_RenderFillRect(app.renderer, NULL);
SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_NONE);
}
SDL_SetRenderTarget(app.renderer, app.uiBuffer);
drawText(UI_WIDTH / 2, 40, 28, TA_CENTER, colors.white, CHALLENGES_TEXT);
@ -447,11 +455,6 @@ static void drawMenu(void)
{
SDL_Rect r;
SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_BLEND);
SDL_SetRenderDrawColor(app.renderer, 0, 0, 0, 128);
SDL_RenderFillRect(app.renderer, NULL);
SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_NONE);
r.w = 400;
r.h = 500;
r.x = (UI_WIDTH / 2) - r.w / 2;