[quake3-commits] r2017 - in trunk/code: client q3_ui

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Jun 11 16:18:16 EDT 2011


Author: thilo
Date: 2011-06-11 16:18:16 -0400 (Sat, 11 Jun 2011)
New Revision: 2017

Modified:
   trunk/code/client/cl_scrn.c
   trunk/code/q3_ui/ui_atoms.c
   trunk/code/q3_ui/ui_credits.c
Log:
Bug 5034  - q3_ui: fill whole screen and allow cursor to move to edge in widescreen, patch by Zack Middleton


Modified: trunk/code/client/cl_scrn.c
===================================================================
--- trunk/code/client/cl_scrn.c	2011-06-11 15:29:57 UTC (rev 2016)
+++ trunk/code/client/cl_scrn.c	2011-06-11 20:18:16 UTC (rev 2017)
@@ -480,11 +480,15 @@
 ==================
 */
 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 @@
 
 	// 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" );

Modified: trunk/code/q3_ui/ui_atoms.c
===================================================================
--- trunk/code/q3_ui/ui_atoms.c	2011-06-11 15:29:57 UTC (rev 2016)
+++ trunk/code/q3_ui/ui_atoms.c	2011-06-11 20:18:16 UTC (rev 2017)
@@ -879,10 +879,10 @@
 
 	// 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)

Modified: trunk/code/q3_ui/ui_credits.c
===================================================================
--- trunk/code/q3_ui/ui_credits.c	2011-06-11 15:29:57 UTC (rev 2016)
+++ trunk/code/q3_ui/ui_credits.c	2011-06-11 20:18:16 UTC (rev 2017)
@@ -166,12 +166,6 @@
 ===============
 */
 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;



More information about the quake3-commits mailing list