mirror of
https://github.com/FWGS/hlsdk-xash3d
synced 2025-01-05 07:55:40 +01:00
Add HUD_MessageBox. Rename isXashFWGS to IsXashFWGS
This commit is contained in:
parent
0c515e3464
commit
cec6d7a1bc
@ -376,7 +376,22 @@ void DLLEXPORT HUD_MobilityInterface( mobile_engfuncs_t *gpMobileEngfuncs )
|
||||
gMobileEngfuncs = gpMobileEngfuncs;
|
||||
}
|
||||
|
||||
bool isXashFWGS()
|
||||
bool HUD_MessageBox( const char *msg )
|
||||
{
|
||||
gEngfuncs.Con_Printf( msg ); // just in case
|
||||
|
||||
if( IsXashFWGS() )
|
||||
{
|
||||
gMobileEngfuncs->pfnSys_Warn( msg );
|
||||
return true;
|
||||
}
|
||||
|
||||
// TODO: Load SDL2 and call ShowSimpleMessageBox
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IsXashFWGS()
|
||||
{
|
||||
return gMobileEngfuncs != NULL;
|
||||
}
|
||||
|
@ -181,5 +181,6 @@ inline void UnpackRGB( int &r, int &g, int &b, unsigned long ulRGB )\
|
||||
|
||||
HSPRITE LoadSprite( const char *pszName );
|
||||
|
||||
bool isXashFWGS();
|
||||
bool HUD_MessageBox( const char *msg );
|
||||
bool IsXashFWGS();
|
||||
#endif
|
||||
|
@ -235,7 +235,7 @@ int CHud::DrawHudString( int xpos, int ypos, int iMaxX, const char *szIt, int r,
|
||||
|
||||
int DrawUtfString( int xpos, int ypos, int iMaxX, const char *szIt, int r, int g, int b )
|
||||
{
|
||||
if (isXashFWGS())
|
||||
if (IsXashFWGS())
|
||||
{
|
||||
// xash3d: reset unicode state
|
||||
gEngfuncs.pfnVGUI2DrawCharacterAdditive( 0, 0, 0, 0, 0, 0, 0 );
|
||||
|
@ -69,7 +69,7 @@ void IN_Shutdown( void )
|
||||
void IN_Init( void )
|
||||
{
|
||||
#ifdef SUPPORT_GOLDSOURCE_INPUT
|
||||
if (isXashFWGS()) {
|
||||
if (IsXashFWGS()) {
|
||||
gEngfuncs.Con_Printf( "FWGS Xash3D input is in use\n" );
|
||||
currentInput = &fwgsInput;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user