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.

106 lines
2.4 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef CL_FOGUIPANEL_H
  8. #define CL_FOGUIPANEL_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/Frame.h>
  13. namespace vgui
  14. {
  15. class Button;
  16. class TextEntry;
  17. class CheckButton;
  18. class Label;
  19. class Slider;
  20. };
  21. //-----------------------------------------------------------------------------
  22. // Purpose:
  23. //-----------------------------------------------------------------------------
  24. class CFogUIPanel : public vgui::Frame
  25. {
  26. DECLARE_CLASS_SIMPLE( CFogUIPanel, vgui::Frame );
  27. public:
  28. CFogUIPanel( vgui::Panel *parent );
  29. ~CFogUIPanel();
  30. virtual void OnTick();
  31. // Command issued
  32. virtual void OnCommand(const char *command);
  33. virtual void OnMessage(const KeyValues *params, vgui::VPANEL fromPanel);
  34. static void InstallFogUI( vgui::Panel *parent );
  35. void InitControls();
  36. void UpdateFogStartSlider();
  37. void UpdateFogEndSlider();
  38. void UpdateFogColorRedSlider();
  39. void UpdateFogColorGreenSlider();
  40. void UpdateFogColorBlueSlider();
  41. void UpdateFogColors();
  42. void UpdateFarZSlider();
  43. protected:
  44. MESSAGE_FUNC_PARAMS( OnTextNewLine, "TextNewLine", data );
  45. MESSAGE_FUNC_PARAMS( OnTextKillFocus, "TextKillFocus", data );
  46. void HandleInput( bool active );
  47. // World fog
  48. vgui::CheckButton *m_pFogOverride;
  49. vgui::CheckButton *m_pFogEnable;
  50. vgui::Slider *m_pFogStart;
  51. vgui::TextEntry *m_pFogStartText;
  52. vgui::Slider *m_pFogEnd;
  53. vgui::TextEntry *m_pFogEndText;
  54. vgui::Slider *m_pFogColorRed;
  55. vgui::TextEntry *m_pFogColorRedText;
  56. vgui::Slider *m_pFogColorGreen;
  57. vgui::TextEntry *m_pFogColorGreenText;
  58. vgui::Slider *m_pFogColorBlue;
  59. vgui::TextEntry *m_pFogColorBlueText;
  60. // Skybox fog
  61. vgui::CheckButton *m_pFogEnableSky;
  62. vgui::Slider *m_pFogStartSky;
  63. vgui::TextEntry *m_pFogStartTextSky;
  64. vgui::Slider *m_pFogEndSky;
  65. vgui::TextEntry *m_pFogEndTextSky;
  66. vgui::Slider *m_pFogColorRedSky;
  67. vgui::TextEntry *m_pFogColorRedTextSky;
  68. vgui::Slider *m_pFogColorGreenSky;
  69. vgui::TextEntry *m_pFogColorGreenTextSky;
  70. vgui::Slider *m_pFogColorBlueSky;
  71. vgui::TextEntry *m_pFogColorBlueTextSky;
  72. // FarZ
  73. vgui::CheckButton *m_pFarZOverride;
  74. vgui::Slider *m_pFarZ;
  75. vgui::TextEntry *m_pFarZText;
  76. bool m_bControlsInitialized;
  77. };
  78. extern CFogUIPanel *g_pFogUI;
  79. #endif // CL_FOGUIPANEL_H