[quake3-commits] r2368 - trunk/code/q3_ui

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Dec 1 18:17:14 EST 2012


Author: ztm
Date: 2012-12-01 18:17:14 -0500 (Sat, 01 Dec 2012)
New Revision: 2368

Modified:
   trunk/code/q3_ui/ui_menu.c
Log:
In q3_ui if uis.demoversion is set, hide "Team Arena" and "Mods" in main menu. (They aren't shown in id's q3a demo and use to be drawn under demo message).

Modified: trunk/code/q3_ui/ui_menu.c
===================================================================
--- trunk/code/q3_ui/ui_menu.c	2012-11-29 17:09:28 UTC (rev 2367)
+++ trunk/code/q3_ui/ui_menu.c	2012-12-01 23:17:14 UTC (rev 2368)
@@ -365,7 +365,7 @@
 	s_main.cinematics.color					= color_red;
 	s_main.cinematics.style					= style;
 
-	if (UI_TeamArenaExists()) {
+	if ( !uis.demoversion && UI_TeamArenaExists() ) {
 		teamArena = qtrue;
 		y += MAIN_MENU_VERTICAL_SPACING;
 		s_main.teamArena.generic.type			= MTYPE_PTEXT;
@@ -379,16 +379,18 @@
 		s_main.teamArena.style					= style;
 	}
 
-	y += MAIN_MENU_VERTICAL_SPACING;
-	s_main.mods.generic.type			= MTYPE_PTEXT;
-	s_main.mods.generic.flags			= QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
-	s_main.mods.generic.x				= 320;
-	s_main.mods.generic.y				= y;
-	s_main.mods.generic.id				= ID_MODS;
-	s_main.mods.generic.callback		= Main_MenuEvent; 
-	s_main.mods.string					= "MODS";
-	s_main.mods.color					= color_red;
-	s_main.mods.style					= style;
+	if ( !uis.demoversion ) {
+		y += MAIN_MENU_VERTICAL_SPACING;
+		s_main.mods.generic.type			= MTYPE_PTEXT;
+		s_main.mods.generic.flags			= QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
+		s_main.mods.generic.x				= 320;
+		s_main.mods.generic.y				= y;
+		s_main.mods.generic.id				= ID_MODS;
+		s_main.mods.generic.callback		= Main_MenuEvent; 
+		s_main.mods.string					= "MODS";
+		s_main.mods.color					= color_red;
+		s_main.mods.style					= style;
+	}
 
 	y += MAIN_MENU_VERTICAL_SPACING;
 	s_main.exit.generic.type				= MTYPE_PTEXT;
@@ -409,7 +411,9 @@
 	if (teamArena) {
 		Menu_AddItem( &s_main.menu,	&s_main.teamArena );
 	}
-	Menu_AddItem( &s_main.menu,	&s_main.mods );
+	if ( !uis.demoversion ) {
+		Menu_AddItem( &s_main.menu,	&s_main.mods );
+	}
 	Menu_AddItem( &s_main.menu,	&s_main.exit );             
 
 	trap_Key_SetCatcher( KEYCATCH_UI );



More information about the quake3-commits mailing list