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.

102 lines
2.3 KiB

  1. //========= Copyright 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 UpdateFogStartSlider();
  36. void UpdateFogEndSlider();
  37. void UpdateFogColorRedSlider();
  38. void UpdateFogColorGreenSlider();
  39. void UpdateFogColorBlueSlider();
  40. void UpdateFogColors();
  41. void UpdateFarZSlider();
  42. protected:
  43. MESSAGE_FUNC_PARAMS( OnTextNewLine, "TextNewLine", data );
  44. MESSAGE_FUNC_PARAMS( OnTextKillFocus, "TextKillFocus", data );
  45. void HandleInput( bool active );
  46. // World fog
  47. vgui::CheckButton *m_pFogOverride;
  48. vgui::CheckButton *m_pFogEnable;
  49. vgui::Slider *m_pFogStart;
  50. vgui::TextEntry *m_pFogStartText;
  51. vgui::Slider *m_pFogEnd;
  52. vgui::TextEntry *m_pFogEndText;
  53. vgui::Slider *m_pFogColorRed;
  54. vgui::TextEntry *m_pFogColorRedText;
  55. vgui::Slider *m_pFogColorGreen;
  56. vgui::TextEntry *m_pFogColorGreenText;
  57. vgui::Slider *m_pFogColorBlue;
  58. vgui::TextEntry *m_pFogColorBlueText;
  59. // Skybox fog
  60. vgui::CheckButton *m_pFogEnableSky;
  61. vgui::Slider *m_pFogStartSky;
  62. vgui::TextEntry *m_pFogStartTextSky;
  63. vgui::Slider *m_pFogEndSky;
  64. vgui::TextEntry *m_pFogEndTextSky;
  65. vgui::Slider *m_pFogColorRedSky;
  66. vgui::TextEntry *m_pFogColorRedTextSky;
  67. vgui::Slider *m_pFogColorGreenSky;
  68. vgui::TextEntry *m_pFogColorGreenTextSky;
  69. vgui::Slider *m_pFogColorBlueSky;
  70. vgui::TextEntry *m_pFogColorBlueTextSky;
  71. // FarZ
  72. vgui::CheckButton *m_pFarZOverride;
  73. vgui::Slider *m_pFarZ;
  74. vgui::TextEntry *m_pFarZText;
  75. };
  76. extern CFogUIPanel *g_pFogUI;
  77. #endif // CL_FOGUIPANEL_H