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 /game/client/dod/VGUI/dodcornercutpanel.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/client/dod/VGUI/dodcornercutpanel.h')
| -rw-r--r-- | game/client/dod/VGUI/dodcornercutpanel.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/game/client/dod/VGUI/dodcornercutpanel.h b/game/client/dod/VGUI/dodcornercutpanel.h new file mode 100644 index 0000000..8ac15a6 --- /dev/null +++ b/game/client/dod/VGUI/dodcornercutpanel.h @@ -0,0 +1,66 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef DOD_CORNERCUTPANEL_H +#define DOD_CORNERCUTPANEL_H +#ifdef _WIN32 +#pragma once +#endif + +#include "cbase.h" +#include <vgui_controls/EditablePanel.h> +#include <vgui/ISurface.h> + +#include "dod_shareddefs.h" + + +//----------------------------------------------------------------------------- +// Purpose: Draws the corner-cut background panels +//----------------------------------------------------------------------------- +class CDoDCutEditablePanel : public vgui::EditablePanel +{ +public: + DECLARE_CLASS_SIMPLE( CDoDCutEditablePanel, vgui::EditablePanel ); + + CDoDCutEditablePanel( vgui::Panel *parent, const char *name ); + + virtual void PaintBackground(); + + virtual void SetBorder( vgui::IBorder *border ); + + virtual void ApplySchemeSettings( vgui::IScheme *pScheme ); + + virtual void SetVisible( bool state ) + { + BaseClass::SetVisible( state ); + } + + virtual void ApplySettings( KeyValues *inResourceData ); + virtual void GetSettings( KeyValues *outResourceData ); + + virtual void SetCornerToCut( int nCorner ){ m_nCornerToCut = nCorner; } + virtual void SetCornerCutSize( int nCutSize ){ m_nCornerCutSize = nCutSize; } + virtual void SetBackGroundColor( const char *pszNewColor ); + virtual void SetBorderColor( const char *pszNewColor ); + +private: + + int m_iBackgroundTexture; + + int m_nCornerToCut; + int m_nCornerCutSize; + + char m_szBackgroundTexture[128]; + char m_szBackgroudColor[128]; + char m_szBorderColor[128]; + + Color m_clrBackground; + Color m_clrBorder; +}; + +#endif // DOD_CORNERCUTPANEL_H + |