summaryrefslogtreecommitdiff
path: root/utils/vgui_panel_zoo/LabelDemo.cpp
blob: a175225ecf08d5192766d86b91df3109a2fab3ce (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================//
#include "DemoPage.h"

#include "vgui/IVGui.h"
#include "tier1/KeyValues.h"
#include <vgui_controls/Label.h>


using namespace vgui;

//-----------------------------------------------------------------------------
// A Label is a panel class to handle the display of images and text strings.
// Here we demonstrate a simple text only label.
//-----------------------------------------------------------------------------

class LabelDemo: public DemoPage
{
	public:
		LabelDemo(Panel *parent, const char *name);
		~LabelDemo();
		
	private:
		Label *m_pLabel;				
};

//-----------------------------------------------------------------------------
// Purpose: Constructor
//-----------------------------------------------------------------------------
LabelDemo::LabelDemo(Panel *parent, const char *name) : DemoPage(parent, name)
{
	m_pLabel = new Label(this, "ALabel", "LabelText");
	m_pLabel->SetPos(100, 100);
}

//-----------------------------------------------------------------------------
// Purpose: Destructor
//-----------------------------------------------------------------------------
LabelDemo::~LabelDemo()
{
}


Panel* LabelDemo_Create(Panel *parent)
{
	return new LabelDemo(parent, "LabelDemo");
}