diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /engine/cl_foguipanel.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'engine/cl_foguipanel.h')
| -rw-r--r-- | engine/cl_foguipanel.h | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/engine/cl_foguipanel.h b/engine/cl_foguipanel.h new file mode 100644 index 0000000..944fbde --- /dev/null +++ b/engine/cl_foguipanel.h @@ -0,0 +1,102 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef CL_FOGUIPANEL_H +#define CL_FOGUIPANEL_H +#ifdef _WIN32 +#pragma once +#endif + +#include <vgui_controls/Frame.h> + + +namespace vgui +{ +class Button; +class TextEntry; +class CheckButton; +class Label; +class Slider; +}; + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +class CFogUIPanel : public vgui::Frame +{ + DECLARE_CLASS_SIMPLE( CFogUIPanel, vgui::Frame ); + +public: + CFogUIPanel( vgui::Panel *parent ); + ~CFogUIPanel(); + + virtual void OnTick(); + + // Command issued + virtual void OnCommand(const char *command); + virtual void OnMessage(const KeyValues *params, vgui::VPANEL fromPanel); + + static void InstallFogUI( vgui::Panel *parent ); + + void UpdateFogStartSlider(); + void UpdateFogEndSlider(); + + void UpdateFogColorRedSlider(); + void UpdateFogColorGreenSlider(); + void UpdateFogColorBlueSlider(); + + void UpdateFogColors(); + + void UpdateFarZSlider(); + +protected: + + MESSAGE_FUNC_PARAMS( OnTextNewLine, "TextNewLine", data ); + MESSAGE_FUNC_PARAMS( OnTextKillFocus, "TextKillFocus", data ); + + void HandleInput( bool active ); + + // World fog + vgui::CheckButton *m_pFogOverride; + vgui::CheckButton *m_pFogEnable; + + vgui::Slider *m_pFogStart; + vgui::TextEntry *m_pFogStartText; + vgui::Slider *m_pFogEnd; + vgui::TextEntry *m_pFogEndText; + + vgui::Slider *m_pFogColorRed; + vgui::TextEntry *m_pFogColorRedText; + vgui::Slider *m_pFogColorGreen; + vgui::TextEntry *m_pFogColorGreenText; + vgui::Slider *m_pFogColorBlue; + vgui::TextEntry *m_pFogColorBlueText; + + // Skybox fog + vgui::CheckButton *m_pFogEnableSky; + + vgui::Slider *m_pFogStartSky; + vgui::TextEntry *m_pFogStartTextSky; + vgui::Slider *m_pFogEndSky; + vgui::TextEntry *m_pFogEndTextSky; + + vgui::Slider *m_pFogColorRedSky; + vgui::TextEntry *m_pFogColorRedTextSky; + vgui::Slider *m_pFogColorGreenSky; + vgui::TextEntry *m_pFogColorGreenTextSky; + vgui::Slider *m_pFogColorBlueSky; + vgui::TextEntry *m_pFogColorBlueTextSky; + + // FarZ + vgui::CheckButton *m_pFarZOverride; + vgui::Slider *m_pFarZ; + vgui::TextEntry *m_pFarZText; +}; + +extern CFogUIPanel *g_pFogUI; + +#endif // CL_FOGUIPANEL_H |