Skip to content

Commit

Permalink
UI: Fix credits outside boundaries for non-wscreen resolutions
Browse files Browse the repository at this point in the history
We need to add some cover above and below the menu screen for non-widescreen resolutions, otherwise credit lines are partly visible outside the menu screen.
  • Loading branch information
kai-li-wop committed Nov 7, 2023
1 parent 6d34481 commit 02ef311
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions code/ui/ui_credits.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ UI_WopCredits_Draw
static void UI_WopCredits_Draw(void) {
int x = 270, y, n, ysize = 0, fadetime = 2.0f;
vec4_t fadecolour = {0.0f, 0.0f, 0.0f, 0.0f};
float yGap;

if (!ysize) {
for(n = 0; n <= sizeof(credits) - 1; n++) {
Expand Down Expand Up @@ -423,6 +424,12 @@ vec4_t fadecolour = {0.0f, 0.0f, 0.0f, 0.0f};
break;
}
}

if (uis.ybias) {
yGap = uis.ybias * 0.5f;
UI_FillRect(0, -yGap, SCREEN_WIDTH, yGap, colorBlack); //upper gap
UI_FillRect(0, SCREEN_HEIGHT, SCREEN_WIDTH, yGap, colorBlack); // lower gap
}
}

/*
Expand Down

0 comments on commit 02ef311

Please sign in to comment.