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
66 lines
1.6 KiB
//========= 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
|
|
|