blob: 8ac15a6782adce4e56837dc9448b196ba3a46b45 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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
|