mirror of
https://github.com/w23/xash3d-fwgs
synced 2025-01-18 23:00:01 +01:00
mainui: update submodule, add connectionprogress calls to engine
This commit is contained in:
parent
24adb6e3e0
commit
01dcb52b4c
@ -135,6 +135,161 @@ qboolean UI_IsVisible( void )
|
||||
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 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 );
|
||||
}
|
||||
|
||||
/*
|
||||
=======================
|
||||
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
|
||||
|
@ -1083,6 +1083,13 @@ void UI_ResetPing( void );
|
||||
void UI_ShowUpdateDialog( qboolean preferStore );
|
||||
void UI_ShowMessageBox( const char *text );
|
||||
void UI_AddTouchButtonToList( const char *name, const char *texture, const char *command, unsigned char *color, int flags );
|
||||
void UI_ConnectionProgress_Disconnect( void );
|
||||
void UI_ConnectionProgress_Download( const char *pszFileName, const char *pszServerName, const char *pszServerPath, int iCurrent, int iTotal, const char *comment );
|
||||
void UI_ConnectionProgress_DownloadEnd( void );
|
||||
void UI_ConnectionProgress_Precache( void );
|
||||
void UI_ConnectionProgress_Connect( const char *server );
|
||||
void UI_ConnectionProgress_ChangeLevel( void );
|
||||
void UI_ConnectionProgress_ParseServerInfo( const char *server );
|
||||
void pfnPIC_Set( HIMAGE hPic, int r, int g, int b, int a );
|
||||
void pfnPIC_Draw( int x, int y, int width, int height, const wrect_t *prc );
|
||||
void pfnPIC_DrawTrans( int x, int y, int width, int height, const wrect_t *prc );
|
||||
|
2
mainui
2
mainui
@ -1 +1 @@
|
||||
Subproject commit e233febd39bd2a9a424d8b19046ffc8d0ea928c8
|
||||
Subproject commit 704012ce4e9b31d41cc472e1d117340856301709
|
Loading…
x
Reference in New Issue
Block a user