mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-27 22:42:09 +00:00
Bug 5034 - q3_ui: fill whole screen and allow cursor to move to edge in widescreen, patch by Zack Middleton
This commit is contained in:
parent
45f576bd99
commit
fa3b3978f6
3 changed files with 10 additions and 12 deletions
|
@ -480,11 +480,15 @@ This will be called twice if rendering in stereo mode
|
|||
==================
|
||||
*/
|
||||
void SCR_DrawScreenField( stereoFrame_t stereoFrame ) {
|
||||
qboolean uiFullscreen;
|
||||
|
||||
re.BeginFrame( stereoFrame );
|
||||
|
||||
uiFullscreen = VM_Call( uivm, UI_IS_FULLSCREEN );
|
||||
|
||||
// wide aspect ratio screens need to have the sides cleared
|
||||
// unless they are displaying game renderings
|
||||
if ( cls.state != CA_ACTIVE && cls.state != CA_CINEMATIC ) {
|
||||
if ( uiFullscreen || (cls.state != CA_ACTIVE && cls.state != CA_CINEMATIC) ) {
|
||||
if ( cls.glconfig.vidWidth * 480 > cls.glconfig.vidHeight * 640 ) {
|
||||
re.SetColor( g_color_table[0] );
|
||||
re.DrawStretchPic( 0, 0, cls.glconfig.vidWidth, cls.glconfig.vidHeight, 0, 0, 0, 0, cls.whiteShader );
|
||||
|
@ -494,7 +498,7 @@ void SCR_DrawScreenField( stereoFrame_t stereoFrame ) {
|
|||
|
||||
// if the menu is going to cover the entire screen, we
|
||||
// don't need to render anything under it
|
||||
if ( uivm && !VM_Call( uivm, UI_IS_FULLSCREEN )) {
|
||||
if ( uivm && !uiFullscreen ) {
|
||||
switch( cls.state ) {
|
||||
default:
|
||||
Com_Error( ERR_FATAL, "SCR_DrawScreenField: bad cls.state" );
|
||||
|
|
|
@ -879,10 +879,10 @@ void UI_MouseEvent( int dx, int dy )
|
|||
|
||||
// update mouse screen position
|
||||
uis.cursorx += dx;
|
||||
if (uis.cursorx < 0)
|
||||
uis.cursorx = 0;
|
||||
else if (uis.cursorx > SCREEN_WIDTH)
|
||||
uis.cursorx = SCREEN_WIDTH;
|
||||
if (uis.cursorx < -uis.bias)
|
||||
uis.cursorx = -uis.bias;
|
||||
else if (uis.cursorx > SCREEN_WIDTH+uis.bias)
|
||||
uis.cursorx = SCREEN_WIDTH+uis.bias;
|
||||
|
||||
uis.cursory += dy;
|
||||
if (uis.cursory < 0)
|
||||
|
|
|
@ -166,12 +166,6 @@ UI_CreditMenu
|
|||
===============
|
||||
*/
|
||||
void UI_CreditMenu( void ) {
|
||||
/* This UI_FillRect() hack will blank the borders if you're in widescreen,
|
||||
so you get a completely black background instead of stripes from the
|
||||
previous frame on each side of the credits.. */
|
||||
const float black[4] = { 0.0f, 0.0f, 0.0f, 1.0f };
|
||||
UI_FillRect(0 - uis.bias, 0, (640.0f / uis.xscale) * 2.0f, 480.0f / uis.yscale, black);
|
||||
|
||||
memset( &s_credits, 0 ,sizeof(s_credits) );
|
||||
|
||||
s_credits.menu.draw = UI_CreditMenu_Draw;
|
||||
|
|
Loading…
Reference in a new issue