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.

79 lines
2.5 KiB

  1. //========= Copyright � Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //==========================================================================//
  6. #ifndef OPTIONS_SUB_VOICE_H
  7. #define OPTIONS_SUB_VOICE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include <vgui_controls/PropertyPage.h>
  12. typedef struct IVoiceTweak_s IVoiceTweak;
  13. class CCvarSlider;
  14. class CCvarToggleCheckButton;
  15. //-----------------------------------------------------------------------------
  16. // Purpose: Voice Details, Part of OptionsDialog
  17. //-----------------------------------------------------------------------------
  18. class COptionsSubVoice : public vgui::PropertyPage
  19. {
  20. DECLARE_CLASS_SIMPLE( COptionsSubVoice, vgui::PropertyPage );
  21. public:
  22. COptionsSubVoice(vgui::Panel *parent);
  23. ~COptionsSubVoice();
  24. virtual void OnResetData();
  25. virtual void OnApplyChanges();
  26. protected:
  27. virtual void OnThink(); // called every frame before painting, but only if panel is visible
  28. private:
  29. virtual void OnCommand( const char *command );
  30. MESSAGE_FUNC( OnPageHide, "PageHide" );
  31. MESSAGE_FUNC_INT( OnSliderMoved, "SliderMoved", position );
  32. MESSAGE_FUNC_INT( OnCheckButtonChecked, "CheckButtonChecked", state );
  33. MESSAGE_FUNC( OnControlModified, "ControlModified" );
  34. void StartTestMicrophone();
  35. void EndTestMicrophone();
  36. void UseCurrentVoiceParameters();
  37. void ResetVoiceParameters();
  38. IVoiceTweak *m_pVoiceTweak; // Engine voice tweak API.
  39. vgui::CheckButton *m_pMicBoost;
  40. vgui::ImagePanel *m_pMicMeter;
  41. vgui::ImagePanel *m_pMicMeter2;
  42. vgui::Button *m_pTestMicrophoneButton;
  43. vgui::Label *m_pMicrophoneSliderLabel;
  44. vgui::Slider *m_pMicrophoneVolume;
  45. vgui::Label *m_pReceiveSliderLabel;
  46. CCvarSlider *m_pReceiveVolume;
  47. // "Open mic" settings
  48. vgui::Label *m_pThresholdSliderLabel;
  49. CCvarSlider *m_pThresholdVolume;
  50. CCvarToggleCheckButton *m_pOpenMicEnableCheckButton;
  51. CCvarToggleCheckButton *m_pVoiceEnableCheckButton;
  52. int m_nVoiceThresholdValue;
  53. int m_nMicVolumeValue;
  54. bool m_bMicBoostSelected;
  55. bool m_bOpenMicSelected;
  56. float m_fReceiveVolume;
  57. int m_nReceiveSliderValue;
  58. bool m_bVoiceOn;
  59. };
  60. #endif // OPTIONS_SUB_VOICE_H