mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-23 20:09:45 +03:00
Support for map-specific HUD animations and HUD layout scripts
This commit is contained in:
@@ -146,6 +146,32 @@ bool CBaseViewport::LoadHudAnimations( void )
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef MAPBASE
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Reloads HUD animations after loading a map-specific HUD animations file.
|
||||
//-----------------------------------------------------------------------------
|
||||
void CBaseViewport::ReloadHudAnimations( void )
|
||||
{
|
||||
// Force a reload
|
||||
if ( LoadHudAnimations() == false )
|
||||
{
|
||||
// Fall back to just the main
|
||||
if ( m_pAnimController->SetScriptFile( GetVPanel(), "scripts/HudAnimations.txt", true ) == false )
|
||||
{
|
||||
Assert(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Loads a map-specific HUD animations file.
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CBaseViewport::LoadCustomHudAnimations( const char *pszFile )
|
||||
{
|
||||
return m_pAnimController->SetScriptFile( GetVPanel(), pszFile, true );
|
||||
}
|
||||
#endif
|
||||
|
||||
//================================================================
|
||||
CBaseViewport::CBaseViewport() : vgui::EditablePanel( NULL, "CBaseViewport")
|
||||
{
|
||||
|
||||
@@ -73,6 +73,10 @@ public:
|
||||
public: // IGameEventListener:
|
||||
virtual void FireGameEvent( IGameEvent * event);
|
||||
|
||||
#ifdef MAPBASE
|
||||
bool LoadCustomHudAnimations( const char *pszFile );
|
||||
void ReloadHudAnimations( void );
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user