diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /gameui/OptionsSubVoice.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'gameui/OptionsSubVoice.h')
| -rw-r--r-- | gameui/OptionsSubVoice.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/gameui/OptionsSubVoice.h b/gameui/OptionsSubVoice.h new file mode 100644 index 0000000..945d9a6 --- /dev/null +++ b/gameui/OptionsSubVoice.h @@ -0,0 +1,73 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef OPTIONS_SUB_VOICE_H +#define OPTIONS_SUB_VOICE_H +#ifdef _WIN32 +#pragma once +#endif + +#include <vgui_controls/PropertyPage.h> + +typedef struct IVoiceTweak_s IVoiceTweak; + +class CCvarSlider; +class CCvarToggleCheckButton; +//----------------------------------------------------------------------------- +// Purpose: Voice Details, Part of OptionsDialog +//----------------------------------------------------------------------------- +class COptionsSubVoice : public vgui::PropertyPage +{ + DECLARE_CLASS_SIMPLE( COptionsSubVoice, vgui::PropertyPage ); + +public: + COptionsSubVoice(vgui::Panel *parent); + ~COptionsSubVoice(); + + virtual void OnResetData(); + virtual void OnApplyChanges(); + +protected: + virtual void OnThink(); // called every frame before painting, but only if panel is visible + +private: + virtual void OnCommand( const char *command ); + + MESSAGE_FUNC( OnPageHide, "PageHide" ); + MESSAGE_FUNC_INT( OnSliderMoved, "SliderMoved", position ); + MESSAGE_FUNC_INT( OnCheckButtonChecked, "CheckButtonChecked", state ); + MESSAGE_FUNC( OnControlModified, "ControlModified" ); + + void StartTestMicrophone(); + void EndTestMicrophone(); + + void UseCurrentVoiceParameters(); + void ResetVoiceParameters(); + + IVoiceTweak *m_pVoiceTweak; // Engine voice tweak API. + vgui::CheckButton *m_pMicBoost; + + vgui::ImagePanel *m_pMicMeter; + vgui::ImagePanel *m_pMicMeter2; + vgui::Button *m_pTestMicrophoneButton; + vgui::Label *m_pMicrophoneSliderLabel; + vgui::Slider *m_pMicrophoneVolume; + vgui::Label *m_pReceiveSliderLabel; + CCvarSlider *m_pReceiveVolume; + CCvarToggleCheckButton *m_pVoiceEnableCheckButton; + + int m_nMicVolumeValue; + bool m_bMicBoostSelected; + float m_fReceiveVolume; + int m_nReceiveSliderValue; + + bool m_bVoiceOn; +}; + + + +#endif // OPTIONS_SUB_VOICE_H
\ No newline at end of file |