summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cl_main.c6
-rw-r--r--src/ui_atoms.c14
-rw-r--r--src/ui_confirm.c129
-rw-r--r--src/ui_local.h2
-rw-r--r--src/ui_public.h2
5 files changed, 5 insertions, 148 deletions
diff --git a/src/cl_main.c b/src/cl_main.c
index 1ceddf7..cb6734c 100644
--- a/src/cl_main.c
+++ b/src/cl_main.c
@@ -589,6 +589,7 @@ void CL_Disconnect( error_type_t type, const char *text ) {
if( !cls.state ) {
return;
}
+
SCR_EndLoadingPlaque(); // get rid of loading plaque
if( cls.state > ca_disconnected && !cls.demo.playback ) {
@@ -612,6 +613,7 @@ void CL_Disconnect( error_type_t type, const char *text ) {
if( cls.demo.recording ) {
CL_Stop_f();
}
+
if( cls.demo.playback ) {
FS_FCloseFile( cls.demo.playback );
@@ -624,6 +626,7 @@ void CL_Disconnect( error_type_t type, const char *text ) {
cls.demo.time_frames, sec, fps );
}
}
+
memset( &cls.demo, 0, sizeof( cls.demo ) );
if( cls.netchan ) {
@@ -647,6 +650,7 @@ void CL_Disconnect( error_type_t type, const char *text ) {
if( cls.download.file ) {
FS_FCloseFile( cls.download.file );
}
+
memset( &cls.download, 0, sizeof( cls.download ) );
CL_ClearState ();
@@ -657,7 +661,7 @@ void CL_Disconnect( error_type_t type, const char *text ) {
cls.userinfo_modified = 0;
#if USE_UI
- UI_ErrorMenu( type, text );
+ UI_OpenMenu( UIMENU_MAIN );
#endif
CL_UpdateFrameTimes();
diff --git a/src/ui_atoms.c b/src/ui_atoms.c
index 071ec36..afbca21 100644
--- a/src/ui_atoms.c
+++ b/src/ui_atoms.c
@@ -246,20 +246,6 @@ void UI_OpenMenu( uiMenu_t type ) {
UI_PushMenu( menu );
}
-void UI_ErrorMenu( error_type_t type, const char *text ) {
- if( !uis.initialized ) {
- return;
- }
- // close any existing menus
- UI_ForceMenuOff();
-
- if( ui_open->integer ) {
- UI_PushMenu( UI_FindMenu( "main" ) );
- M_Menu_Error( type, text );
- }
-}
-
-
//=============================================================================
/*
diff --git a/src/ui_confirm.c b/src/ui_confirm.c
deleted file mode 100644
index 59ec978..0000000
--- a/src/ui_confirm.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
-Copyright (C) 1997-2001 Id Software, Inc.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#include "ui_local.h"
-
-
-/*
-=======================================================================
-
-CONFIRM MENU
-
-=======================================================================
-*/
-
-typedef struct {
- menuFrameWork_t menu;
- menuStatic_t text;
- confirmAction_t action;
-} confirmMenu_t;
-
-static confirmMenu_t m_confirm;
-
-static menuSound_t ConfirmKeydown( menuFrameWork_t *self, int key ) {
- switch( key ) {
- case 'Y':
- case 'y':
- m_confirm.action( qtrue );
- // UI_PopMenu();
- return QMS_IN;
- case 'N':
- case 'n':
- m_confirm.action( qfalse );
- UI_PopMenu();
- return QMS_OUT;
- default:
- return QMS_NOTHANDLED;
- }
-}
-
-void M_Menu_Confirm( const char *text, confirmAction_t action ) {
- memset( &m_confirm, 0, sizeof( m_confirm ) );
-
- m_confirm.menu.keydown = ConfirmKeydown;
- m_confirm.menu.image = uis.backgroundHandle;
- FastColorCopy( colorBlack, m_confirm.menu.color );
-
- m_confirm.text.generic.type = MTYPE_STATIC;
- m_confirm.text.generic.name = ( char * )text;
- m_confirm.text.generic.uiFlags = UI_CENTER;
-
- m_confirm.action = action;
-
- Menu_AddItem( &m_confirm.menu, &m_confirm.text );
-
- UI_PushMenu( &m_confirm.menu );
-
-}
-
-/*
-=======================================================================
-
-ERROR MENU
-
-=======================================================================
-*/
-
-typedef struct m_errorMenu_s {
- menuFrameWork_t menu;
- menuStatic_t text;
-} m_errorMenu_t;
-
-static m_errorMenu_t m_error;
-
-static menuSound_t ErrorKeydown( menuFrameWork_t *self, int key ) {
- UI_PopMenu();
- return QMS_OUT;
-}
-
-void M_Menu_Error( error_type_t type, const char *text ) {
- color_t color;
-
- if( !text ) {
- return;
- }
- switch( type ) {
- case ERR_SILENT:
- return;
- case ERR_DROP:
- FastColorCopy( colorRed, color );
- break;
- default:
- FastColorCopy( colorYellow, color );
- break;
- }
-
- memset( &m_error, 0, sizeof( m_error ) );
-
- m_error.menu.keydown = ErrorKeydown;
- m_error.menu.image = uis.backgroundHandle;
- FastColorCopy( colorBlack, m_error.menu.color );
-
- m_error.text.generic.type = MTYPE_STATIC;
- m_error.text.generic.flags = QMF_CUSTOM_COLOR;
- m_error.text.generic.name = ( char * )text;
- m_error.text.generic.uiFlags = UI_CENTER|UI_MULTILINE;
- FastColorCopy( color, m_error.text.generic.color );
-
- Menu_AddItem( &m_error.menu, ( void * )&m_error.text );
-
- UI_PushMenu( &m_error.menu );
-}
-
diff --git a/src/ui_local.h b/src/ui_local.h
index 28cc38c..2c12cdd 100644
--- a/src/ui_local.h
+++ b/src/ui_local.h
@@ -346,8 +346,6 @@ qboolean Menu_Push( menuFrameWork_t *menu );
void Menu_Pop( menuFrameWork_t *menu );
void Menu_Free( menuFrameWork_t *menu );
-void M_Menu_Error( error_type_t type, const char *text );
-void M_Menu_Confirm( const char *text, confirmAction_t action );
void M_Menu_PlayerConfig( void );
void M_Menu_Demos( void );
void M_Menu_Servers( void );
diff --git a/src/ui_public.h b/src/ui_public.h
index 01f335a..100d010 100644
--- a/src/ui_public.h
+++ b/src/ui_public.h
@@ -32,9 +32,7 @@ void UI_Keydown( int key );
void UI_CharEvent( int key );
void UI_Draw( int realtime );
void UI_OpenMenu( uiMenu_t menu );
-void UI_ErrorMenu( error_type_t type, const char *text );
void UI_AddToServerList( const serverStatus_t *status );
void UI_MouseEvent( int x, int y );
qboolean UI_IsTransparent( void );
-void UI_DrawLoading( int realtime );