summaryrefslogtreecommitdiff
path: root/public/dme_controls/soundrecordpanel.h
diff options
context:
space:
mode:
Diffstat (limited to 'public/dme_controls/soundrecordpanel.h')
-rw-r--r--public/dme_controls/soundrecordpanel.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/public/dme_controls/soundrecordpanel.h b/public/dme_controls/soundrecordpanel.h
new file mode 100644
index 0000000..7162efc
--- /dev/null
+++ b/public/dme_controls/soundrecordpanel.h
@@ -0,0 +1,66 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================
+
+#ifndef SOUNDRECORDPANEL_H
+#define SOUNDRECORDPANEL_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "vgui_controls/Frame.h"
+#include "tier1/utlstring.h"
+
+
+//-----------------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------------
+namespace vgui
+{
+ class Button;
+}
+
+
+//-----------------------------------------------------------------------------
+// Purpose: Modal sound picker window
+//-----------------------------------------------------------------------------
+class CSoundRecordPanel : public vgui::Frame
+{
+ DECLARE_CLASS_SIMPLE( CSoundRecordPanel, vgui::Frame );
+
+public:
+ CSoundRecordPanel( vgui::Panel *pParent, const char *pTitle );
+ ~CSoundRecordPanel();
+
+ // Inherited from Frame
+ virtual void OnCommand( const char *pCommand );
+ virtual void OnTick();
+
+ // Purpose: Activate the dialog
+ // The message "SoundRecorded" will be sent if a sound is recorded
+ void DoModal( const char *pFileName );
+
+private:
+ void StopSoundPreview( );
+ void PlaySoundPreview( );
+
+ // Updates sound record time during recording
+ void UpdateTimeRecorded();
+
+ vgui::Button *m_pRecordButton;
+ vgui::Button *m_pPlayButton;
+ vgui::Button *m_pOkButton;
+ vgui::Button *m_pCancelButton;
+ vgui::TextEntry *m_pRecordTime;
+ vgui::TextEntry *m_pFileName;
+ CUtlString m_FileName;
+ CUtlString m_EngineFileName;
+ int m_nPlayingSound;
+ float m_flRecordStartTime;
+ bool m_bIsRecording;
+};
+
+
+#endif // SOUNDRECORDPANEL_H