Team Fortress 2 Source Code as on 22/4/2020
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.

72 lines
2.2 KiB

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