- Stretch backgrounds to fit screen in widescreen, I think it looks nicer.

This commit is contained in:
zturtleman 2011-02-18 22:17:13 +00:00
parent 8ccf97ae15
commit 55b4bc8693
2 changed files with 10 additions and 9 deletions

View file

@ -1537,10 +1537,10 @@ void UI_Refresh( int realtime )
{
// draw the background
if( uis.activemenu->showlogo ) {
UI_DrawHandlePic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, uis.menuBackShader );
UI_DrawHandlePic( -uis.bias, 0, SCREEN_WIDTH+uis.bias*2, SCREEN_HEIGHT, uis.menuBackShader );
}
else {
UI_DrawHandlePic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, uis.menuBackNoLogoShader );
UI_DrawHandlePic( -uis.bias, 0, SCREEN_WIDTH+uis.bias*2, SCREEN_HEIGHT, uis.menuBackNoLogoShader );
}
}
@ -1548,10 +1548,11 @@ void UI_Refresh( int realtime )
if (uis.menusp > 1){
// draw the background pic
if (uis.stack[uis.menusp-2]->fullscreen){
if( uis.stack[uis.menusp-2]->showlogo )
UI_DrawHandlePic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, uis.menuBackShader );
else
UI_DrawHandlePic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, uis.menuBackNoLogoShader );
if( uis.stack[uis.menusp-2]->showlogo ) {
UI_DrawHandlePic( -uis.bias, 0, SCREEN_WIDTH+uis.bias*2, SCREEN_HEIGHT, uis.menuBackShader );
} else {
UI_DrawHandlePic( -uis.bias, 0, SCREEN_WIDTH+uis.bias*2, SCREEN_HEIGHT, uis.menuBackNoLogoShader );
}
}
// draw the background menu
@ -1561,7 +1562,7 @@ void UI_Refresh( int realtime )
Menu_Draw( uis.stack[uis.menusp-2] );
// dim the background menu
UI_FillRect( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, menu_back_color );
UI_FillRect( -uis.bias, 0, SCREEN_WIDTH+uis.bias*2, SCREEN_HEIGHT, menu_back_color );
}
}

View file

@ -224,11 +224,11 @@ static void ScrollingCredits_Draw(void)
// first, fill the background with the specified colour/shader
// we are drawing a shader
#ifdef BACKGROUND_SHADER
UI_DrawHandlePic(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, BackgroundShader);
UI_DrawHandlePic(-uis.bias, 0, SCREEN_WIDTH+uis.bias*2, SCREEN_HEIGHT, BackgroundShader);
#else
// we are just filling a color
UI_FillRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, color_background);
UI_FillRect(-uis.bias, 0, SCREEN_WIDTH+uis.bias*2, SCREEN_HEIGHT, color_background);
#endif