|
|
@ -135,6 +135,161 @@ qboolean UI_IsVisible( void ) |
|
|
|
return gameui.dllFuncs.pfnIsVisible(); |
|
|
|
return gameui.dllFuncs.pfnIsVisible(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
======================= |
|
|
|
|
|
|
|
UI_AddTouchButtonToList |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
send button parameters to menu |
|
|
|
|
|
|
|
======================= |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void UI_AddTouchButtonToList( const char *name, const char *texture, const char *command, unsigned char *color, int flags ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( gameui.dllFuncs2.pfnAddTouchButtonToList ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gameui.dllFuncs2.pfnAddTouchButtonToList( name, texture, command, color, flags ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
================= |
|
|
|
|
|
|
|
UI_ResetPing |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
notify gameui dll about latency reset |
|
|
|
|
|
|
|
================= |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void UI_ResetPing( void ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( gameui.dllFuncs2.pfnResetPing ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gameui.dllFuncs2.pfnResetPing( ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
================= |
|
|
|
|
|
|
|
UI_ShowConnectionWarning |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
show connection warning dialog implemented by gameui dll |
|
|
|
|
|
|
|
================= |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void UI_ShowConnectionWarning( void ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( cls.state != ca_connected ) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( Host_IsLocalClient() ) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( ++cl.lostpackets == 8 ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
CL_Disconnect(); |
|
|
|
|
|
|
|
if( gameui.dllFuncs2.pfnShowConnectionWarning ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gameui.dllFuncs2.pfnShowConnectionWarning(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Con_DPrintf( S_WARN "Too many lost packets! Showing Network options menu\n" ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
================= |
|
|
|
|
|
|
|
UI_ShowConnectionWarning |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
show update dialog |
|
|
|
|
|
|
|
================= |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void UI_ShowUpdateDialog( qboolean preferStore ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( gameui.dllFuncs2.pfnShowUpdateDialog ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gameui.dllFuncs2.pfnShowUpdateDialog( preferStore ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Con_Printf( S_WARN "This version is not supported anymore. To continue, install latest engine version\n" ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
================= |
|
|
|
|
|
|
|
UI_ShowConnectionWarning |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
show message box |
|
|
|
|
|
|
|
================= |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void UI_ShowMessageBox( const char *text ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( gameui.dllFuncs2.pfnShowMessageBox ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gameui.dllFuncs2.pfnShowMessageBox( text ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UI_ConnectionProgress_Disconnect( void ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( gameui.dllFuncs2.pfnConnectionProgress_Disconnect ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gameui.dllFuncs2.pfnConnectionProgress_Disconnect( ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UI_ConnectionProgress_Download( const char *pszFileName, const char *pszServerName, const char *pszServerPath, int iCurrent, int iTotal, const char *comment ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( !gameui.dllFuncs2.pfnConnectionProgress_Download ) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( pszServerPath ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
char serverpath[MAX_SYSPATH]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Q_snprintf( serverpath, sizeof( serverpath ), "%s%s", pszServerName, pszServerPath ); |
|
|
|
|
|
|
|
gameui.dllFuncs2.pfnConnectionProgress_Download( pszFileName, serverpath, iCurrent, iTotal, comment ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gameui.dllFuncs2.pfnConnectionProgress_Download( pszFileName, pszServerName, iCurrent, iTotal, comment ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UI_ConnectionProgress_DownloadEnd( void ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( gameui.dllFuncs2.pfnConnectionProgress_DownloadEnd ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gameui.dllFuncs2.pfnConnectionProgress_DownloadEnd( ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UI_ConnectionProgress_Precache( void ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( gameui.dllFuncs2.pfnConnectionProgress_Precache ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gameui.dllFuncs2.pfnConnectionProgress_Precache( ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UI_ConnectionProgress_Connect( const char *server ) // NULL for local server
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( gameui.dllFuncs2.pfnConnectionProgress_Connect ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gameui.dllFuncs2.pfnConnectionProgress_Connect( server ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UI_ConnectionProgress_ChangeLevel( void ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( gameui.dllFuncs2.pfnConnectionProgress_ChangeLevel ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gameui.dllFuncs2.pfnConnectionProgress_ChangeLevel( ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UI_ConnectionProgress_ParseServerInfo( const char *server ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( gameui.dllFuncs2.pfnConnectionProgress_ParseServerInfo ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gameui.dllFuncs2.pfnConnectionProgress_ParseServerInfo( server ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void UI_DrawLogo( const char *filename, float x, float y, float width, float height ) |
|
|
|
static void UI_DrawLogo( const char *filename, float x, float y, float width, float height ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
static float cin_time; |
|
|
|
static float cin_time; |
|
|
@ -488,95 +643,6 @@ void pfnPIC_DrawAdditive( int x, int y, int width, int height, const wrect_t *pr |
|
|
|
PIC_DrawGeneric( x, y, width, height, prc ); |
|
|
|
PIC_DrawGeneric( x, y, width, height, prc ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
======================= |
|
|
|
|
|
|
|
UI_AddTouchButtonToList |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
send button parameters to menu |
|
|
|
|
|
|
|
======================= |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void UI_AddTouchButtonToList( const char *name, const char *texture, const char *command, unsigned char *color, int flags ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( gameui.dllFuncs2.pfnAddTouchButtonToList ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gameui.dllFuncs2.pfnAddTouchButtonToList( name, texture, command, color, flags ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
================= |
|
|
|
|
|
|
|
UI_ResetPing |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
notify gameui dll about latency reset |
|
|
|
|
|
|
|
================= |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void UI_ResetPing( void ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( gameui.dllFuncs2.pfnResetPing ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gameui.dllFuncs2.pfnResetPing( ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
================= |
|
|
|
|
|
|
|
UI_ShowConnectionWarning |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
show connection warning dialog implemented by gameui dll |
|
|
|
|
|
|
|
================= |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void UI_ShowConnectionWarning( void ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( cls.state != ca_connected ) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( Host_IsLocalClient() ) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( ++cl.lostpackets == 8 ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
CL_Disconnect(); |
|
|
|
|
|
|
|
if( gameui.dllFuncs2.pfnShowConnectionWarning ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gameui.dllFuncs2.pfnShowConnectionWarning(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Con_DPrintf( S_WARN "Too many lost packets! Showing Network options menu\n" ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
================= |
|
|
|
|
|
|
|
UI_ShowConnectionWarning |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
show update dialog |
|
|
|
|
|
|
|
================= |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void UI_ShowUpdateDialog( qboolean preferStore ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( gameui.dllFuncs2.pfnShowUpdateDialog ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gameui.dllFuncs2.pfnShowUpdateDialog( preferStore ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Con_Printf( S_WARN "This version is not supported anymore. To continue, install latest engine version\n" ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
================= |
|
|
|
|
|
|
|
UI_ShowConnectionWarning |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
show message box |
|
|
|
|
|
|
|
================= |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void UI_ShowMessageBox( const char *text ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( gameui.dllFuncs2.pfnShowMessageBox ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
gameui.dllFuncs2.pfnShowMessageBox( text ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
========= |
|
|
|
========= |
|
|
|
pfnPIC_EnableScissor |
|
|
|
pfnPIC_EnableScissor |
|
|
|