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.

66 lines
1.6 KiB

  1. //====== Copyright � 1996-2005, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef SOUNDRECORDPANEL_H
  7. #define SOUNDRECORDPANEL_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "vgui_controls/Frame.h"
  12. #include "tier1/utlstring.h"
  13. //-----------------------------------------------------------------------------
  14. // Forward declarations
  15. //-----------------------------------------------------------------------------
  16. namespace vgui
  17. {
  18. class Button;
  19. }
  20. //-----------------------------------------------------------------------------
  21. // Purpose: Modal sound picker window
  22. //-----------------------------------------------------------------------------
  23. class CSoundRecordPanel : public vgui::Frame
  24. {
  25. DECLARE_CLASS_SIMPLE( CSoundRecordPanel, vgui::Frame );
  26. public:
  27. CSoundRecordPanel( vgui::Panel *pParent, const char *pTitle );
  28. ~CSoundRecordPanel();
  29. // Inherited from Frame
  30. virtual void OnCommand( const char *pCommand );
  31. virtual void OnTick();
  32. // Purpose: Activate the dialog
  33. // The message "SoundRecorded" will be sent if a sound is recorded
  34. void DoModal( const char *pFileName );
  35. private:
  36. void StopSoundPreview( );
  37. void PlaySoundPreview( );
  38. // Updates sound record time during recording
  39. void UpdateTimeRecorded();
  40. vgui::Button *m_pRecordButton;
  41. vgui::Button *m_pPlayButton;
  42. vgui::Button *m_pOkButton;
  43. vgui::Button *m_pCancelButton;
  44. vgui::TextEntry *m_pRecordTime;
  45. vgui::TextEntry *m_pFileName;
  46. CUtlString m_FileName;
  47. CUtlString m_EngineFileName;
  48. int m_nPlayingSound;
  49. float m_flRecordStartTime;
  50. bool m_bIsRecording;
  51. };
  52. #endif // SOUNDRECORDPANEL_H