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.

46 lines
1.1 KiB

  1. //========= Copyright 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. //===================================================================================//
  4. #ifndef HUD_SUBTITLES_H
  5. #define HUD_SUBTITLES_H
  6. #ifdef _WIN32
  7. #pragma once
  8. #endif
  9. #include "hudelement.h"
  10. #include <vgui_controls/Panel.h>
  11. #include <vgui_controls/EditablePanel.h>
  12. #include "subtitlepanel.h"
  13. namespace vgui
  14. {
  15. class IScheme;
  16. };
  17. //-----------------------------------------------------------------------------
  18. // Purpose:
  19. //-----------------------------------------------------------------------------
  20. class CHudSubtitles : public CHudElement, public vgui::EditablePanel
  21. {
  22. DECLARE_CLASS_SIMPLE( CHudSubtitles, vgui::EditablePanel );
  23. void StartCaptions( const char *pFilename );
  24. void StopCaptions();
  25. public:
  26. explicit CHudSubtitles( const char *pElementName );
  27. ~CHudSubtitles();
  28. protected:
  29. virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
  30. virtual bool ShouldDraw();
  31. virtual void LevelShutdown();
  32. virtual void Reset();
  33. private:
  34. CSubtitlePanel *m_pSubtitlePanel;
  35. bool m_bIsPaused;
  36. };
  37. #endif // HUD_SUBTITLES_H