summaryrefslogtreecommitdiff
path: root/public/dme_controls/soundrecordpanel.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /public/dme_controls/soundrecordpanel.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
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