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.

79 lines
2.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef OPTIONS_SUB_VIDEO_H
  8. #define OPTIONS_SUB_VIDEO_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/Panel.h>
  13. #include <vgui_controls/ComboBox.h>
  14. #include <vgui_controls/PropertyPage.h>
  15. #include "EngineInterface.h"
  16. #include "IGameUIFuncs.h"
  17. #include "URLButton.h"
  18. class CCvarSlider;
  19. //-----------------------------------------------------------------------------
  20. // Purpose: Video Details, Part of OptionsDialog
  21. //-----------------------------------------------------------------------------
  22. class COptionsSubVideo : public vgui::PropertyPage
  23. {
  24. DECLARE_CLASS_SIMPLE( COptionsSubVideo, vgui::PropertyPage );
  25. public:
  26. COptionsSubVideo(vgui::Panel *parent);
  27. ~COptionsSubVideo();
  28. virtual void OnResetData();
  29. virtual void OnApplyChanges();
  30. virtual void PerformLayout();
  31. virtual bool RequiresRestart();
  32. private:
  33. void SetCurrentResolutionComboItem();
  34. void EnableOrDisableWindowedForVR();
  35. MESSAGE_FUNC( OnDataChanged, "ControlModified" );
  36. MESSAGE_FUNC_PTR_CHARPTR( OnTextChanged, "TextChanged", panel, text );
  37. MESSAGE_FUNC( OpenAdvanced, "OpenAdvanced" );
  38. MESSAGE_FUNC( LaunchBenchmark, "LaunchBenchmark" );
  39. MESSAGE_FUNC( OpenGammaDialog, "OpenGammaDialog" );
  40. void PrepareResolutionList();
  41. bool BUseHDContent();
  42. void SetUseHDContent( bool bUse );
  43. int m_nSelectedMode; // -1 if we are running in a nonstandard mode
  44. bool m_bDisplayedVRModeMessage;
  45. vgui::ComboBox *m_pMode;
  46. vgui::ComboBox *m_pWindowed;
  47. vgui::ComboBox *m_pAspectRatio;
  48. vgui::ComboBox *m_pVRMode;
  49. vgui::Button *m_pGammaButton;
  50. vgui::Button *m_pAdvanced;
  51. vgui::Button *m_pBenchmark;
  52. vgui::CheckButton *m_pHDContent;
  53. vgui::DHANDLE<class COptionsSubVideoAdvancedDlg> m_hOptionsSubVideoAdvancedDlg;
  54. vgui::DHANDLE<class CGammaDialog> m_hGammaDialog;
  55. bool m_bRequireRestart;
  56. MESSAGE_FUNC( OpenThirdPartyVideoCreditsDialog, "OpenThirdPartyVideoCreditsDialog" );
  57. vgui::URLButton *m_pThirdPartyCredits;
  58. vgui::DHANDLE<class COptionsSubVideoThirdPartyCreditsDlg> m_OptionsSubVideoThirdPartyCreditsDlg;
  59. };
  60. #endif // OPTIONS_SUB_VIDEO_H