Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.5 KiB

  1. //====== Copyright � 1996-2007, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose: VGUI panel which can play back video, in-engine
  4. //
  5. //=============================================================================
  6. #ifndef VGUI_HUDVIDEO_H
  7. #define VGUI_HUDVIDEO_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "vgui_video.h"
  12. class HUDVideoPanel : public VideoPanel
  13. {
  14. DECLARE_CLASS_SIMPLE( HUDVideoPanel, VideoPanel );
  15. public:
  16. HUDVideoPanel( vgui::Panel *parent, const char *name );
  17. virtual void Paint( void );
  18. virtual void Activate( void );
  19. virtual void DoModal( void );
  20. virtual void OnVideoOver();
  21. void ReturnToLoopVideo( void );
  22. void PlayTempVideo( const char *pFilename, const char *pTransitionFilename = NULL );
  23. void SetLoopVideo( const char *pFilename, int nNumLoopAlternatives = 0, float fAlternateChance = 1.0f );
  24. const char* GetCurrentVideo( void ) const;
  25. const char* GetLoopVideo( void ) const { return m_szLoopVideo; }
  26. const char* GetLastTempVideo( void ) const { return m_szLastTempVideo; }
  27. private:
  28. char m_szLoopVideo[ FILENAME_MAX ];
  29. char m_szLastTempVideo[ FILENAME_MAX ];
  30. int m_nNumLoopAlternatives;
  31. float m_fAlternateChance;
  32. bool m_bIsLoopVideo;
  33. bool m_bIsTransition;
  34. };
  35. HUDVideoPanel *HUDVideoPanel_Create( vgui::Panel *pParent,
  36. unsigned int iWide, unsigned int iTall,
  37. const char *pVideoFilename,
  38. const char *pExitCommand = NULL,
  39. float flFadeInTime = 1,
  40. bool bLoop = false,
  41. bool bPreloadVideo = false );
  42. #endif // VGUI_HUDVIDEO_H